Show all columns while bringing together in a single column.

Hi all

I have a table called demo.

TaskName start_date end_date duration_in_mins

06/04/2015 Task1 02:10:24 06/04/2015 02:13:24 3

06/04/2015 Task1 02:09:24 06/04/2015 02:13:24 4

06/04/2015 Task1 02:11:24 06/04/2015 02:13:24 2

06/04/2015 Task2 02:05:24 06/04/2015 02:13:24 8

06/04/2015 Task2 02:06:24 06/04/2015 02:13:24 7

I need to display all the columns in the demo. But I need to display only records that have maximum (duration_in_mins) TaskName group.

TaskName start_date end_date duration_in_mins

06/04/2015 Task1 02:09:24 06/04/2015 02:13:24 4

06/04/2015 Task2 02:05:24 06/04/2015 02:13:24 8


Please give me a solution.


Thank you

Arun.

Try below,

Select a.taskname, a.start_date, a.end_date, a.duration_in_mins

demo one

inner join (select taskname, max (duration_in_mins) as max_dur of the demo group by TaskName) b

on a.taskname = b.taskname and a.duration_in_mins = B.max_dur

Tags: Database

Similar Questions

  • Needs of report to show all columns

    Hello, I have two interactive reports on two different pages, and I'm unable to show all columns. It will automatically appear all the columns. I know that I can show them all with Actions / Select the columns / > >, but I can't expect all of my users to do each time that they reopen the browser. They want that search the IRs without pressing Actions each time.

    In my 1st report, I just a column of money, but it will not appear automatically. How can I get the GAL_PUMPED to automatically display column without using the Actions menu each time?

    SELECT UFT.SITE_NUM, UFT.TANK, UFT.FUEL_TYPE, sum(UFT.GALLONS) GAL_PUMPED
    FROM  futrak.FUEL_TRANSACTIONS  UFT
    WHERE to_char(UFT.TRAN_DATE,'MON-YYYY') < to_char(SYSDATE,'MON-YYYY')
    GROUP BY UFT.SITE_NUM, UFT.TANK, UFT.FUEL_TYPE
     

    In my 2nd report, only columns of fth automatically, will not display the columns of ftd. How all the columns in the two tables to automatically display without the Actions menu each time? Also, the unit is supposed to be the last column, but this problem makes the 3rd column after using select columns. I'm stuck with APEX 4.0 and may not use plugins, but I want to hack everything that will help solve this problem. I'd appreciate any help or advice, thank you.

    SELECT fth.SITE_NUM, fth.TANK, sum(ftd.GALLONS), ftd.FLEET_ID, ftd.EXPENSE_TO_PROJECT, ftd.EXPENSE_TO_TASK, fth.UNIT_NUM
    FROM FUEL_USAGE_HEADER fth,
      FUEL_USAGE_DETAIL ftd
    WHERE 
      fth.FUEL_USAGE_ID = ftd.FUEL_USAGE_ID
    AND fth.PROCESSED_DATE is null 
    AND to_char(fth.TRANSACTION_DATE,'MON-YYYY') < to_char(SYSDATE,'MON-YYYY')
    GROUP BY fth.SITE_NUM, fth.TANK ,ftd.FLEET_ID, ftd.EXPENSE_TO_PROJECT, ftd.EXPENSE_TO_TASK, fth.UNIT_NUM
    order by 1
     

    Display all Columns.png

    Login to your application as a developer when running. Modify the report in the way that your users need. Save the report, select "default report parameters.

  • How to show all lines of tabular form on a single Page?

    Dear Apex Experts,

    Is there a feature in the tabular Presentation , or the workaround even to show all lines of tabular form on a single page?
    as in the interactive report where 'ALL' option when selected displays all lines.

    Thank you in advance for any help you provide

    Best regards

    create an item
    assign a number 1000000 or more and on the area of research reports a number of lines returned to the point and set with the name of the element

  • show all columns with union all

    Hi all
    select m_id, total, cat_id
    from scott.maintenance
    where prod_id = 1
    union all
    select m_id, total, prod_id
    from scott.maintenance
    where prod_id = 4
    How can I view all (and not common) columns of the two tables when I use union all like
    m_Id, total, cat_id, prod_id

    Thank you
    Johnny

    Hi, Johnny,.

    user9542267 wrote:
    Hi all

    select m_id, total, cat_id
    from scott.maintenance
    where prod_id = 1
    union all
    select m_id, total, prod_id
    from scott.maintenance
    where prod_id = 4
    

    How can I view all (and not common) columns of the two tables when I use union all like
    m_Id, total, cat_id, prod_id

    Thank you
    Johnny

    There is no need to make a trade UNION for this:

    SELECT  *
    FROM    scott.maintenance
    WHERE   prod_id IN (1, 4)
    ;
    

    If you really need to do a UNION and basic tables were the same or had the same number and types of columns, then you can use SELECT * in the two branches of the UNION:

    SELECT  *
    FROM    scott.maintenance
        --
    UNION ALL
        --
    SELECT  *
    FROM    foo.maintenance
    ;
    

    If the columns have different names in the two tables, the names of the first branch of the UNION will be used in the output.

    In all cases, you can add literal NULL values to the SELECT one or more branches of the UNION clause:

    SELECT  ename     AS name
    ,       hiredate
    ,       deptno
    FROM    scott.emp
        --
    UNION ALL
        --
    SELECT  dname     AS name        -- alias not necessary, but helpful
    ,       NULL      AS hiredate    -- alias not necessary, but helpful
    ,       deptno
    FROM    scott.dept
    ;
    

    Depending on your tables and your requirements of yor, you might be able to use SELECT * in a branch of the UNION.

    Published by: Frank Kulash, February 15, 2011 12:29

  • Catalogue bringing together on a single hard drive.

    My catalog is scattered over several drives. What is the right way to go all out several different hard disks on a very large hard drive?

    If you consolidate because you move at a large new or different hard drive, you have two options.

    Option 1: you can drag and drop files in the Lightroom library module. Have been reported by users who have done what all the pictures move, and then they have to spend a lot of time to find the missing images.

    Option 2: you can move folders of images to the new hard drive with your operating system. When you view the folder that you moved Lightroom will tell you he hasn't. So we must show Lightroom were the file is now located.

    Lightroom think my photos are missing - how to fix? Lightroom Queen

    If you have a lot of images and folders to move, it is my opinion that option 2 is the best option. The operating system seems to do a better job to move the files. But we must take the time to point Lightroom to the folders on the new hard drive. It's not that much time, but it needs to be done.

    If you're going to make this gesture, I strongly suggest that you organize your folder tree, so that you have a main folder with subfolders for different years or different projects or what ever in this main folder. Then, in the future, if you need to make this move again simply move the main folder and then find that missing folder in its new location and everything will be connected as it should.

  • The temporary internet files folder does not show all the files in this folder property while is more than 1 GB. How to delete temporary internet files. ?

    The temporary internet files folder does not show all the files in this folder property while is more than 1 GB. How to delete temporary internet files. ?  Disk space is very low around 1 & half GB. Please someone help resolve this issue. I am looking for the solution, but it did not have a specific.

    Thank you best regards &.

    Atul Zade.

    CCleaner is very useful to get rid of temporary files, you can get it here: http://www.piriform.com/ccleaner you can use it to clean your temporary files, but DO NOT use registry cleaning works, registry cleaning is mainly a useless effort that can cause more harm than good.

    John

  • Interactive report - strange not all columns are showing?

    Hello

    Something weird is happening with my interactive report, not all columns are displayed, and I have no idea why this is happening?

    In my column attributes, they are set to display as text, but only some of the columns are presented

    Another weird issue is the search bar is also not appear, and it is set to show?

    Any ideas on how to solve this problem, in particular the first issue with columns

    Thank you very much

    If you changed your IR source and added columns, then you must add columns in the menu actions IR indeed. Of course, the columns have to 'See' active in their attributes.
    If you don't see the search bar, check the IR options. Ditto for the menu actions. If both are true, make sure there is no dynamic action masking the region holding the IR tools.

  • The search for bookmarks in the library "Show all bookmarks": output is missing an * important * thing...

    (1) open a library "show all bookmarks".
    (2) search for any article you know is there, but you don't know where he is among the Favorites.
    3) click on any element in the resulting list.
    (4) you will see a lot of information about the item (bookmark), you clicked on.

    What you want * NOT * see is this very important piece of information: the LOCATION IN THE LIBRARY OF THIS BOOKMARK.

    Where this bookmark is placed in the library? In what folder/subfolder?

    I invite the developers of FireFox to add this info. Please...

    Thank you!

    There is an add-on for this:

    https://addons.Mozilla.org/firefox/addon/show-parent-folder/

    After installation and activation of the extension, Parent folder must appear on the list of columns in the Library dialog box.

    If you want to see the full hierarchy the bookmark rather that just the name of the folder, you can set the page modules. Either:

    • CTRL + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click Extensions. Find show Parent folder on the right, then click on the Options button.

    Note: The extension was created more than 7 years ago and he's still not a built-in feature, so please don't hold your breath!

  • Sometimes! Win7 Explorer shows all the computers on my network

    I've seen this question asked several times, but I never saw that she responded.

    I'm running Windows 7 Ultimate.

    When I open Windows Explorer, it may or it may not properly display all computers that are running on the network.

    Why?

    I'm on a small business network.

    On this network, there are Linux machines, other machines Win 7, Win XP (32-bit and 64-bit) and a NAS box.

    There is a 16 node switch link them together and a single router to connect to this network to the internet.

    Vs welcoming groups, working groups of the network discovery on or off, firewall on or off - I know you want to ask

    These issues, but to think.   Sometimes Windows Explorer shows all computers correctly.

    The real question is;  What would be - what makes US see a computer sometimes BUT not other times.

    That is a difficult question.

    I want to clarify that there is also a Win XP 64 bit machine on the network.   WE on that is still see the network as it really is.

    So what "feature" Microsoft has added to Win7, what causes this?

    and my research to solve this problem gave me a workaround solution.    If I absolutely have to allows US to observe one of the other computers,

    I can type //computername/ in the box at the top of US and that can see me the files/folders/drives on this computer.

    Thanks for your help.

    Hello

    I suggest you post this question on the TechNet Forum. They are professional support which are well equipped with knowledge on the issue that you are facing, do please visit the link provided below.

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?Forum=w7itpronetworking

    Email us if you have any other question related to Windows.

  • Win 8 the Action Center Maintenance flag shows all the time.

    Hi, I just upgraded to Windows 8, and so far, everything is good, except that I noticed that the Maintenance indicator shows all the time in the taskbar. It started yesterday, previously only proven while in fact the interview. How can I fix it?

    Why don't you just open control panel... icons in notification area and choose for the "notifications action center 'flag' to see the only?

  • Bring together those who have clicked on a link in a newsletter

    Hi all, this is my first post so be gentle with me

    We recently bought Eloqua and we start now with campaigns. The campaign that we are lacking consists of two emails with the same three subjects. The third email is an email invitation to a fair and based on your clicks (interest), you receive a "custom" email

    Question so very basic (I think): How do you collect people who click a link automatically?

    gather interestees.png

    As I did so far:

    • create a campaign for 1 email
    • check for clicked on send
    • create a shared filter as I am checking (new) if they clicked on the email and if they visited the page behind the link in the newsletter. I don't find anything in Eloqua to check if someone clicks a specific link.
    • If they are members of the filter, I add to a shared list. This common list collects then all people who clicked on this link.

    the shared filter example

    filter.png

    Things that go wrong now:

    • It seems that people who click on the first link to get added to the list of shared right, but evaluated if they clicked on the link 2 or 3

    Main question:

    • If I can make this different? I just want to bring together people who have clicked on one of the topics in the first two transmissions and send them a personalized invitation based on the theme clicked.

    I could also do something like that (so I can leave aside shared lists, but if someone clicks on the link more than one, they receive more than one email

    pers email.png

    Thanks for your help!

    In Eloqua, there is no simple way to use the action of 'Clicked' in a campaign to determine if a person has clicked on a link in an e-mail.

    There are 2 ways you can overcome this though.  If this page is hosted on a site that Eloqua has taken you could create a filter that trying to find out if a person has visited a Web site and paste the URL to group them.

    Or you can do what is referred to as a blind form submission.  In this case, you can create a form that redirects users to a specific link.  If your email would point to the form and your form would simply redirect the user to the destination page.  The redirection is transparent for the user and my experience does impact negatively the UX of the process.

  • By using the analytical function to sort without showing this column in the result.

    Hello

    We use the Oracle 11.2

    How to use Oracle Analytics to sort the output of a query without showing this column in the result?

    Here's my query:

    Select distinct nvl(SRC_CHR_NM,'0') | » #'|| NVL(EXPL_SRC,'0') | » #'|| NVL(DIM_NM,'0') | » #'|| NVL(DIM_CHR_NM,'0') | » #'|| NVL(DIM_CHR_ABR,'0') | » #'||

    Decode (InStr (NVL(SRC_COL_NM,'0'), 'trim ('),'1 ', Replace (NVL(SRC_COL_NM,'0'),'trim (',' trim(PRM_DTL.'), '0',' PRM_DTL.)))) » || NVL(SRC_COL_NM,'0')) AS ALLOFIT,

    DIM_NM

    from EXPL_CONFIG where SBJ_AREA_CD = 'PRMDTL. '

    I want to use analytical to sort by DIM_NM but I do not want to show. I want to just just the ALLOFIT column to show in the output.

    Something like "row_number() over (order by DIM_NM desc).

    Thank you!

    Hello

    If you SELECT SEPARATE, then you can only ORDER OF things in the SELECT clause. (Do you really need to do SELECT DISTINCT?  Often, it's just an inefficient way to remove the lines that do not need to be there at all).

    Move making the SELECT DISTINCT in a subquery and make the ORDER BY (and nothing else) in the main query.

    I hope that answers your question.

    If this isn't the case, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

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

  • By selecting "Show all bookmarks" show all bookmarks

    Selection of bookmarks in Firefox produces a drop-down list of my favorites. By selecting "Show all bookmarks" in this menu is no longer produces a page with all my favorites. A call of 'Library' page with only a few items happens. This change took place recently. Selecting the icon of the bookmarks at the top right in Firefox also displays a drop-down list of all my favorites.

    There are three broad categories of bookmarks:

    • Bookmarks menu
    • Bookmarks Toolbar
    • Other favorites (previously called Unsorted Bookmarks, I think)

    When you open the Library dialog box by using "Show all bookmarks" or Ctrl + Shift + b, it opens in this third category. To select a different category, use the diagram 'tree' in the left column.

    Who works on your Firefox?

  • 'Show All' reveals previously hidden sublayer

    We have all hide and expose things constantly while we work.

    But when you do a show all (CTRL + ALT + 3), to the unhide effectively all the hidden objects, is there a way to do without display of all sublayers hidden as well.

    When I do a Show All, sublayers even that have been hidden when the file was opened (and never not hidden) view as well as all the hidden objects. Frustrating.

    allunhidden.PNG

    (No, I'm not to blame for the Papyrus!)

    Show all means exactly that, so if you want to keep some of the hidden things "at all times" you'd better to be on a separate layer.

  • Get rid of the option "show all Menu items".

    How to get rid of the "Show all Menu items" option in the Application menu and keep open all the menu items?

    You should be able to reset your menus under Edit > Menus by choosing together: Basic.

Maybe you are looking for

  • Tecra M2 - cannot install the last driver wireless

    I'm updating the Intel wireless network driver as my wireless connection does not work. I downloaded and unzipped the file wlesslan-xp-90231 but when I click on the icon to start the setup happens 'could not retrieve all of the adapter-specific infor

  • Measured by two unique settings complete with USB-6211?

  • Used to scan HP 4480

    I have a HP 4480 and I just installed it in my Windows Vista Dell computer. When I open the HP Solution Center to scan, the scanning window will not open upward after that I click Scan picture or Document. It can scan if I use the Windows Gallery pro

  • Trigger of the DAQ Assistant to loop For

    Hello I am very new to Labview and assigned to a writing program.  I've been through the academic tutorials, but they only cover basics.  What I'm trying to do is to use a 100 County loop interactions For and turn at the exit of my Daq Assistant powe

  • Camera application

    Hello I am attached to a J2me application that would use camera my camera functions in my application can anyone help me please with the approach that I have to follow waiting for answer Thanks in advance