Combination of tw or more queries

Hello

I work in the BI reports, I need to create the data model of 7 different queries unfortunately I am not very good with SQL queries. I have following queries works well when I run individually, but I would like to combine them so that I can get the result in one. In fact, I have 7 requests similar to this, I would like to combine them all in a single query to produce a unique data model a place on 7. If any one can help these 2 combing, I will follow the same patch to combine the rest of my questions. Thanks in advance!

Select«MGMT$ METRIC_DAILY '.»» TARGET_NAME' as 'targetname '.
«MGMT$ METRIC_DAILY '.»» TARGET_TYPE' as 'TARGET_TYPE ',.
«MGMT$ METRIC_DAILY '.»» METRIC_NAME"as"METRIC_NAME. "
«MGMT$ METRIC_DAILY '.»» METRIC_COLUMN"as"METRIC_COLUMN. "
«MGMT$ METRIC_DAILY '.»» MEANS"as"Mem_Util. "
To_char (ROLLUP_TIMESTAMP, 'DD') as 'DATE '.

Of'MGMT_VIEW '. "" MGMT$ METRIC_DAILY "' MGMT$ METRIC_DAILY.
where«MGMT$ METRIC_DAILY '.»» TARGET_TYPE' = "host".
and«MGMT$ METRIC_DAILY '.»» METRIC_NAME' = 'Load '.
and«MGMT$ METRIC_DAILY '.»» METRIC_COLUMN"="memUsedPct. "

and "MGMT$ METRIC_DAILY. "" TARGET_NAME ' IN (: P_Target_NAME)

AND ((: P_TIME_PERIOD = "7"))

AND ROLLUP_TIMESTAMP > = SYSDATE - 7)

ORDER BY ROLLUP_TIMESTAMP



QUERY 2:



Select«MGMT$ METRIC_DAILY '.»» TARGET_NAME' as 'targetname '.
«MGMT$ METRIC_DAILY '.»» TARGET_TYPE' as 'TARGET_TYPE ',.
«MGMT$ METRIC_DAILY '.»» METRIC_NAME"as"METRIC_NAME. "
«MGMT$ METRIC_DAILY '.»» METRIC_COLUMN"as"METRIC_COLUMN. "
«MGMT$ METRIC_DAILY '.»» "AVERAGE of" as "CPU_UTIL."

To_char (ROLLUP_TIMESTAMP, 'DD') as 'DATE '.

Of'MGMT_VIEW '. "" MGMT$ METRIC_DAILY "' MGMT$ METRIC_DAILY.
where«MGMT$ METRIC_DAILY '.»» TARGET_TYPE' = "host".
and«MGMT$ METRIC_DAILY '.»» METRIC_NAME' = 'Load '.
and«MGMT$ METRIC_DAILY '.»» METRIC_COLUMN"="cpuUtil. "

and "MGMT$ METRIC_DAILY. "" TARGET_NAME ' IN (: P_Target_NAME)

AND ((: P_TIME_PERIOD = "7"))

AND ROLLUP_TIMESTAMP > = SYSDATE - 7)

ORDER BY ROLLUP_TIMESTAMP

Tag! I am.

Hi 24601

Change

ORDER BY ROLLUP_TIMESTAMP

TO

ORDER BY TO_CHAR (ROLLUP_TIMESTAMP, 'DD')

Friends advice:

Please change your handle/forum name for an easier to remember name.

Please provide examples of displaying data create and insert statements or use the clause.

Re: 2. How can I ask a question in the forums?

BTW. Welcome to the forum.

Tags: Database

Similar Questions

  • I need to combine PDFs 12 or more

    I need to combine PDFs 12 or more how do I do this?

    Not sure what you mean by "upload to a site. If it is a blog like Word Press or third party web hosting, you must use FTP or whatever this blog or host supports. Adobe, you can download the files to the current CC site to https://assets.adobe.com or in the cloud of Document https://cloud.acrobat.com/.

  • Hello, I would like to turn off my combination because it is more than a month that I can't use the service

    Hello, I would like to turn off my combination because it is more than a month that I can't use the service

    Contact support by web chat or by phone.

    Mylenium

  • combining 2 grahics or more in a single

    Using AS3 code, it is possible to combine 2 graphics or more into a single?

    Example: combining a rectangle and a triangle to make a nice arrow?

    Do you know something about AS3 drawing API - I guess that's what you need to use:

    This is an example of how you can draw the rectangle:

    var sp:Sprite = new Sprite();

    sp.graphics.beginFill (0xff0000);

    sp.graphics.drawRect (0, 0, 100 200);

    sp.graphics.endFill ();

    addChild (sp);

    Read:

    http://livedocs.Adobe.com/Flash/9.0/ActionScriptLangRefV3/Flash/display/graphics.html

    And this:

    http://livedocs.Adobe.com/Flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts & file = 00000176.html

  • Combining the two (or more) of a calendar

    I'm new on first, (CS4) Finally after years, that I decided do something with my videos at home and the fifth has jumped into it.

    My question is this, I have gathered two projects (by any existing project), and now I have two deadlines. How can I merge or combine these together in one time line. Combining the different tracks audio and video of two timelines e.g. copy video timeline Track6 B to the (empty) 5 video track in the timeline has)

    Thank you

    You said auto, you can copy/paiste tracks in one sequence to another.

    If the previous two projects were already edited and finished, you can create a new seqence (let's call it the master) and NEST the two sequences of two previous Master-sequence one after another in the time line.

    After that, you can just cut in small pieces and make a new complete video.

    Your project previously two will remain intact, but if you want to change some fundamental effects on the master you need to go back into the original sequence and edit there. (I'm not one that suits to explain anything in easy mode)

    sikter

  • How to combine together 3 or more than one table 2D to a 3D chart


    Build table should do what you want.

    Note that I changed the value of the first element in tables 2 and 3 so that you can tell where the data on the different pages added table came.

    Lynn

  • How to reach the output of two or more queries?

    Suppose a query:
    select count (id) COL1 from table_1 gives:
    COL1
    59
    and another request:
    select count (id) COL2 from table_2 gives:
    COL2
    23
    .
    HOW can I get this output:
    Col1 COl2
    59 23
    edited by: "bootstrap" October 14, 2011 14:08

    Get each count in the subquery:

    SELECT
        (
            SELECT
                COUNT(*)
            FROM
                job
        ) AS cnt_job,
        (
            SELECT
                COUNT(*)
            FROM
                department
        ) AS cnt_department
    FROM
        dual;
    
    CNT_JOB                CNT_DEPARTMENT
    ---------------------- ----------------------
    51                     4                      
    
  • How to combine several physical queries

    Hi all

    I have a large reports with more 70-80 columns in response. This isn't a report of Pivot. Now it generates 3 physical motion.

    I need to merge this 3 requests in a single request. But it seems very difficult to implement.

    Two points:
    1 report generates 3 physical motion. All queries are queries GROUP BY, and each of them giving different count separately
    2. If we find a way to combine. The result would be different answers report result (that's my assumption)
    3. how the answer is combining the results of 3 queries and we show the result?

    No entry or thought is appreciated top.

    I'm totally stuck in there. Tried in different ways. But is there a solution for this that I'm not able to think?

    Pls Help

    Thanks in advance

    Concerning
    Nathalie

    Hello
    In the answers--> tab check the sql issued. How the tool takes the query. Hope It will help you write a sql query.

  • Combine results of 2 motions, one of them using Group by and a WITH statement

    Hello world

    I am trying to find a way to combine the results of 2 queries (Oracle 11 g). The first query was a select simple, something like:

    SELECT A.ACTDAT, A.ENDDAT, A.ITMCOD, B.ITMDSC, A.PRDORD, A.FPQTY, A.FPACT
    FROM Table1 A, Table2 B WHERE A.ITMCOD=B.ITMCOD AND A.VERNUM='VM10' ORDER BY A.PRDORD;
    

    The second query is not so "simple", but:

    WITH Tab1 (ProdOrd,Pdate)
          AS (SELECT T.PRDORD, TO_CHAR(T.SYSDAT, 'MM-DD-RR HH24:MI') FROM Table3 T,
    Table4 I, Table5 D, Table6 E
    WHERE I.ITMCLS = D.ITMCLS AND I.ITMCOD = D.ITMCOD
    AND D.DTLTYP = 'F' AND D.TRNSEQ = T.TRNSEQ
    AND T.TRNTYP = 'LINTAK'
    AND D.LOCATN = '10'
    AND E.PRDORD IN (SELECT PRDORD FROM PRDQUE WHERE VERNUM='VM10') 
    )
    SELECT MIN(Pdate) "1er LINTAK", MAX(Pdate) "Ult. LINTAK" FROM Tab1
    GROUP BY ProdOrd
    ORDER BY ProdOrd;
    

    For each A.PRDORD in #1 query, the second query should return the

    MIN(Pdate)
    

    and

    MAX(Pdate)
    

    as follows:

    A.ACDAT (from #1 query) A.ENDAT (from #1 query) A.ITMCOD (from #1 query) B.ITMDSC (from #1 query) A.PRDORD (from #1 query) A.FPQTY (from #1 query) A.FPACT (from #1 query) Min (pdate) (from query #2) Max (pdate) (from query #2)
    02/04/2014-06:0002/04/2014 08:59:43XXYYZZDescription of XXYYZZ00090001770854359702/04/14 06:1702/04/14-09:16

    While separately, both queries return the following results:

    Query #1:


    A.ACDAT (from #1 query) A.ENDAT (from #1 query) A.ITMCOD (from #1 query) B.ITMDSC (from #1 query) A.PRDORD (from #1 query) A.FPQTY (from #1 query) A.FPACT (from #1 query)
    02/04/2014-06:0002/04/2014 08:59:43XXYYZZDescription of XXYYZZ000900017708543597


    Query #2:

    Min (pdate) (from query #2) (pdate) Max (from query #2)
    02/04/14 06:1702/04/14-09:16

    Note: PRDORD in Table1 (query #1) est the same as PRDORD in Table2 (request #2).

    Hope my question is clear enough.

    Any advice or suggestions will be more than welcome!

    Hello

    Post a small example of data (CREATE TABLE and INSERT for all involved tables, the columns only statements) and the results desired from these data.

    See the FAQ forum: https://forums.oracle.com/message/9362002

    You want to include the lines of table2 who lines returned in the other tables.  This sounds like the job for an outer join.

    You want to ignore the dates on some lines.  That wound like a job for a CASE expression (or if-then-else function specialized, like NVL2).

  • 2 operating systems. How to remove 1 OS and combine partitions in addition to space?

    I have Vista and XP. I'm trying to find a way to remove the XP on the D: drive, on a partition, then combine the two partitions more of space on C: drice. Can you please help me by telling me the steps or guide me to where I can find the steps so that I don't waste anything?

    Thank you very much!

    Kat

    Here's how to make a Bootable Vista Startup Repair disk:

    If you do not have a Microsoft Vista DVD, make a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use:

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    See you soon.

    Mick Murphy - Microsoft partner

  • Combination of keys Ctrl for 'move' does not

    Hello

    The Photoshop CC 2015 has been updated this morning, and now I have a problem with the shortcut of CTRL key combination.  It works more like "move"; the move icon appears but it starts to create a selection instead of the move feature window.  Help, please.

    The bug has been fixed in 2015.1.1.

    My apologies for the inconvenience.

  • How to send two requests to separate from OBI and combine the results

    Hi all

    I'm trying to understand how to combine the results of two queries in OBI. Here's the scenario.

    There are three tables, users, security roles however joined a bridge Table Role_User

    Each user has multiple roles, the roles to which a user has access is identified by a column of flag with value T otherwise there F value.

    I am creating an analysis as below

    ID of the user
    Access roles Roles have no access

    Therefore, column 2 shows all roles with indicator T for the particular user and column 2 shows all roles with indicator F for the same user.

    I tried to create two fact tables and using the filter condition on the value of the indicator, but in the analysis, I could use only one at a time. When I add the two columns, I get the error as none of the fact table are compatible with the query request. I would like to hierarchies for dimensions created and assigned in terms of content for all the facts and decreases in intensity.

    Any advice will be highly appreciated.

    Thank you

    Found the solution. I'm posting here in case where someone faced with a similar question.

    I've added the SQL code in the Advanced tab:

    Select A.saw_0 saw_0, A.saw_1 saw_1, B.saw_1 saw_2

    FROM (Select Col1, Col2 FROM Table1 saw_1 saw_0) a LEFT OUTER JOIN

    (Saw_0 select Col1, Col2 saw_1 FROM Table2) B

    on A.saw_0 = B.saw_0

    I created the logic of the facts using the source even with two different filter conditions and were used with a subquery as above

    Ref: OBIEE Interviews: reports

  • Flash error when combining files

    Acrobat Pro XI, when the combination of two or more a PDF in a single file, I get and error to assert the content I need to download flash.  Ive checked and we took the latest version.

    The operating system on the device is Windows 8.1 and it is patched to the latest version of flash inside the BONE, even when trying to go to the link provided, it only says that it is already installed.  Thank youSshot.png

    Hi reddamo,

    Adobe Acrobat beams is no longer a Flash Player in order to make the content of Flash technology in the pages.

    To do this, you must use a separate Flash Player. Please see this kb file to download the Flash Player:

    Acrobat help. Flash Player required | Acrobat, Reader XI

    Kind regards

    Ana Maria

  • Combining effects and smart shapes

    Is it possible to combine Forms 2 or more intelligent in a single shape (ala Illustrator Pathfinder feature)?

    Is it possible to apply an effect to a group of objects (rather than an object at a time not the Group)?

    Two times NO, and you have discovered (again) two of my feature for forms requests. Please support me!

  • Can't find the Insert key on Dell XPS 10 tablet with keyboard docking station

    Original title: Windows RT Question

    I have a Dell XPS 10 tablet with keyboard docking station.  I can't find an "Insert" button anywhere on it. I use a remote connection which has a login screen that requires a combination of keys Ctrl-Alt-Insert to initiate. Searched high & low online and off. Can't find a way to generate the Insert key race in this environment on this tablet. Someone at - it the answer?

    Hi Kerry,

    You can consult the manual provided by Dell, namely the architecture detailed on the keyboard. Also, you can get in touch with Dell support. Check out the link to post the same query in the Dell forum:

    http://en.community.Dell.com/support-forums/laptop/

    In the meantime, you can use the onscreen keyboard. Check out the link to use a keyboard on the screen under Windows:

    http://Windows.Microsoft.com/en-us/Windows-8/type-with-the-on-screen-keyboard

    Please let us know if you have more queries on Windows.

Maybe you are looking for