Select max (length) - how to display the length of a group MAX

Hello

I have a table with the name of DVD and names of files on the DVD.
I would like to know how to change this query to get another column, MAX_LENGHT, the MAXIMUM length of the name of FILE to a DVD of return
This doesn't work request
select DVD, FILENAME, (SELECT max(length(FILENAME)) / 2 + 4 FROM TABLE) AS MAX_LENGHT from TABLE
DESIRED RESULT
DVD    FILENAME     MAX LENGHT
DVD1     Alina     8
DVD1     Aidan     8
DVD1     Aiden     8
DVD1     Akira     8
DVD1     Alex     8
DVD1     Alyssa     8
DVD1     Arianna     8
DVD1     Ashley     8
DVD1     Ava     8
DVD1     Benjamin8
DVD1     Bianca     8
DVD1     Blake     8
DVD1     Brandon     8
DVD1     Brayden     8
DVD1     Brayden     8
DVD1     Brianna     8
DVD1     Brielle     8
DVD1     Brooklyn8
DVD2     Dakota     11
DVD2     Dalia     11
DVD2     Daniel     11
DVD2     Dante     11
DVD2     David     11
DVD2     Diego     11
DVD2     Dingbang11
DVD2     Dominic     11
DVD2     Dylan     11
DVD2     Chase     11
DVD2     Chloe     11
DVD2     Christopher     11
DVD2     Claire     11
DVD2     Cole     11
DVD2     Connor     11
Thank you

Roseline

You can use the analytic version of the function max:

SELECT  DVD
,       FILENAME
,       MAX(LENGTH(FILENAME)) OVER (PARTITION BY DVD) AS MAX_LENGTH
FROM    TABLE

Tags: Database

Similar Questions

  • How to display the list of components in ultiboard 10?

    The DRC report the errors where the components that are no longer in the design have been removed. How to display the list component and then remove them from the netlist to stop this?

    Ultiboard reported missing errors of component (part 'X' is not about design) because the part is always referenced by a net. To fix this, you must remove the part of the net. Following the steps below to remove the part form the net.

    1 tools > Netlist Editor

    2. for each network that the part has been connected to, select the Net (upper-left).

    3. Select the tab of pine trees, select the part and it is the PIN in the dialog box, then click on remove

    The problem is when the part is removed, I see no easy way to determine the threads you need to remove the part of. I entered this as a feature request to make this easier, but as a workaround, you can put part and say Ultiboard what the missing part, then search the net names on the pins and remove the part of these pins

    1 place a piece with a lot of pine trees (for example the part that was removed, or for example through Hole technology > Connectors > SIL & headers > HEADER2X9). When you place the part, make sure that the RefDes matches the RefDes of the part which has been removed.

    2. once the room is placed, you should see rats nest lines that connect the part to the nets.

    3 Zoom on the pins. You should now see the net name on each of the axes. For each of the pins connected, remove it from the net as described above.

    4. remove the part that you placed.

  • How to display the lsit of play while visualizations are playing

    How to display the playlist while visualizations are playing

    What version of WMP are you using?

    You can usually right click the button reading at the top and select view the list pane.

  • How to display the speaker icon in the taskbar in windows 7?

    How to display the "speaker" of the taskbar icon in windows 7?

    Thank you

    concerning

    Jamal

    Hi Jamal

    1. right click on the taskbar, and then select Properties.

    In the Notification area section, click the Customize button.

    2. in the Configuration window, find the Volume icon.

    The Drop Down Menu to select the icon lounge and Notifications.

    3. If you don't see the Volume icon, click system icons activate or deactivate the link at the bottom of the window.

    Find the Volume icon and select enabled in the menu dropdown.

    Repeat step 2.

    Let us know the results.

    Concerning

  • How to display the menu bar in Windows Explorer?

    I use Intel Core i5-3470 CPU @ 3.20 GHz, 8, 0 GB of RAM, Intel HD graphics card
    MS Windows 7 Home Premium v. 6.1 64-bit SP1
    I have Kaspersky Internet Security in 2014, and I Google Talk, Skype and Memeo Backup Premium Pro running in the background.

    I tried to display the path in Windows Explorer (see arrow)

    None of these options allows to get anything.

    How to display the path?

    1. Click on start, then run
    2. Type: REGSVR32 /i BROWSEUI. DLL
    3. Close all Windows Explorer Windows
    4. Bring up the Task Manager
    5. Kill explorer.exe (which is the operation of the office)
    6. In Task Manager, select file, then new task (run)
    7. Type explorer.exe

    Open a new Windows Explorer, the address bar should now be visible.

  • BI Layout Editor - how to display the current date?

    Hello

    Recently used BI Layout Editor (previously using MS Word to create the presentation of the State).

    He seems really nice and easy to use.

    However quick Q - How to display the current date in the layout editor (to show the report run date).

    Any quick suggestions is appreciated.

    Thank you

    Vivek

    Tab displays your selection available.

    It's like how when you insert the table in the Word document and when you select the table, you would see 2 additional tabs such as the design and the tool.

    Can you please insert "Text Element" and select the text element and see if you go to the tab 'text '?

  • SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.

    SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.

    Hello

    You can use REGEXP_SUBSTR Oracle/PLSQL: REGEXP_SUBSTR function

    Select the function double REGEXP_SUBSTR('PUBLIC RELATION REPRESENTATIVE ','[^]+',1,2);

    Do you have any value of the column as no 2nd string?

  • How to display the parameter string registered by DBMS_XMLINDEX?

    This is probably a stupid question, but I can't seem to find any function to display the setting of a parameter string that was recorded by DBMX_XMLINDEX. REGISTERPARAMETER.

    For example,.

    If I have:
    BEGIN
    DBMX_XMLINDEX.REGISTERPARAMETER('indexParam', 'xxxxxxxx');
    END;
    /
    How to display the value of 'indexParam' after creation?
    SQL> set long 1000
    SQL>
    SQL> select paramstr
      2  from xdb.xdb$xidx_param_t
      3  where param_name = 'MYINDEXPARAM'
      4  ;
    
    PARAMSTR
    --------------------------------------------------------------------------------
    PATH TABLE po_ptab
        PATH ID INDEX po_pidx
        ORDER KEY INDEX po_oidx
        VALUE INDEX po_vidx
        PATHS(NAMESPACE MAPPING(xmlns:p="http://www.example.com/IPO"))
        GROUP MASTERGROUP XMLTABLE PO_TAB
        ('/p:PurchaseOrder'
            COLUMNS
               REFERENCE VARCHAR2(30) PATH 'p:Reference',
               REQUESTOR VARCHAR2(30) PATH 'p:Requestor' )
        GROUP ITEMGROUP XMLTABLE ITEMGROUP_TAB
        ('/p:PurchaseOrder/p:LineItems/p:LineItem'
            COLUMNS
               LINENUMBER NUMBER(38) PATH '@p:ItemNumber',
               QUANTITY NUMBER(38) PATH '@p:Quantity',
               DESCRIPTION VARCHAR2(256) PATH 'p:Description')
     
    

    After you add it to an index, you can also view the content in USER_XML_INDEXES. PARAMETERS (XML format).

  • How to display the names of header fields in the next page in report6i

    How to display the names of header fields repeated in the next page of report6i urgent please...


    When I'm runing report in 1st page that showing only the header in page 2 information header information does not display only records appear. So I want to display the header in 2nd page also information.

    You can help.

    Hello

    Go for the model of report layout and select these elements/objects that do not display on the next page and pressing the F4 key to open the palette of the property and set the property Print object on to All the Pages , then it will appear on all pages.

    -Clément

  • OBIEE answers how to display the menu drop-down

    Hello
    In answers how to display the name that we choose in the drop-down list on the report page

    and another thing is that I want to display the number of lines in the report as report salary has 20 lines, followed by the 20 lines in the report

    Waiting for your answer.

    Rgrds,
    Bala

    Published by: user13068446 on May 13, 2010 22:30

    create a report and save it.

    now, to create a line of dashboard your wish to keep as it's the default SNA record the prompt of the dashboard.

    now, go to the dashboard - options - section drag and report him.

    now do drag the guest to this article and put this promp above the report...

    Save it
    Now you can see the drop down prompt menu selected

    Concerning

    J Mama Prasad

  • How to display the results in the order based on the value of research

    Hi all

    How to display the results in the slot order.
     
    
    CREATE TABLE TEST( SONGID  NUMBER, TITLE   VARCHAR2(200))
    
    INSERT INTO TEST(SONGID,TITLE) VALUES (10,'AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)');
    INSERT INTO TEST(SONGID,TITLE) VALUES (11,'CICCONE, MADONNA (CA)');
    INSERT INTO TEST(SONGID,TITLE) VALUES (12,'DALLIN, MADONNA LOUISE/STOCK');
    INSERT INTO TEST(SONGID,TITLE) VALUES (13,'MADONNA');
    INSERT INTO TEST(SONGID,TITLE) VALUES (14,'MADONNA (A)/ AHMADZAI, MIRWAIS (C)');
    INSERT INTO TEST(SONGID,TITLE) VALUES (15,'MADONNA (CA)');
    INSERT INTO TEST(SONGID,TITLE) VALUES (16,'MIRWAIS AHMADZAI, MADONNA');     
    INSERT INTO TEST(SONGID,TITLE) VALUES (17,'MIRWAIS (CA)/ MADONNA (CA),AHMADZAI');
    INSERT INTO TEST(SONGID,TITLE) VALUES (18,'MADONNA (CA),CICCONE');
    
    SELECT *FROM  TEST WHERE INSTR (TITLE, 'MADONNA') > 0
    
    output: 
    SONGID     TITLE
    10     AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)
    11     CICCONE, MADONNA (CA)
    12     DALLIN, MADONNA LOUISE/STOCK
    13     MADONNA
    14     MADONNA (A)/ AHMADZAI, MIRWAIS (C)
    15     MADONNA (CA)
    16     MIRWAIS AHMADZAI, MADONNA
    17     MIRWAIS (CA)/ MADONNA (CA),AHMADZAI
    18     MADONNA (CA),CICCONE
    
    Expected output :
    13     MADONNA
    14     MADONNA (A)/ AHMADZAI, MIRWAIS (C)
    15     MADONNA (CA)
    18     MADONNA (CA),CICCONE
    ..
    ..
    ..
    ..
    ...
    If the user makes a search with "MADONNA", I view the results as title begins with "MADONNA" first then the rest of the records.
    Please let me know is possible to show the results in this order.


    Kind regards
    Rajasekhar

    This can be a little more specific:

    SQL> SELECT *
      2  FROM   TEST
      3  WHERE  INSTR (TITLE, 'MADONNA') > 0
      4  ORDER  BY INSTR (TITLE, 'MADONNA')
      5           ,TITLE
      6  ;
    
                  SONGID TITLE
    -------------------- --------------------------------------
                      13 MADONNA
                      14 MADONNA (A)/ AHMADZAI, MIRWAIS (C)
                      15 MADONNA (CA)
                      18 MADONNA (CA),CICCONE
                      12 DALLIN, MADONNA LOUISE/STOCK
                      11 CICCONE, MADONNA (CA)
                      17 MIRWAIS (CA)/ MADONNA (CA),AHMADZAI
                      16 MIRWAIS AHMADZAI, MADONNA
                      10 AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)
    
  • How to display the rownum in oracle forms?

    Hai all,

    How to display the rownum in oracle forms?

    Thank you
    RCS
    ----------------

    I would add rowum with the current form of group_mstr:

    former columns:

    group_id
    GroupName

    new columns will be:

    identifier of the line
    group_id
    GroupName


    I created as follows:
    in forms
    text tool > row id
    text element > EXT_ITEM20

    error text element: no white color, it's a different color
    --------------

    create > Trigger > a time new form instance > I gave like this:

    DECLARE
    CURSOR crrow_id IS
    SELECT count (*) + 1 group_mstr;
    BEGIN
    OPEN crrow_id.
    Search FOR crrow_id IN: TEXT_ITEM20;
    CLOSE Crrow_id;
    END;
    ------------
    error: identifier group_mst must be declard
    ============

    I don't know also not quite what you want to display in your form. Do you want to just number the records displayed, from 1 to n?

    If so, create a text whose property 'data base element' element to the value 'no', "calculation method" formula and the formula itself: SYSTEM. " TRIGGER_RECORD, then, in each case, the registration number should be indicated.

  • How to display the width of the page or the big screen in firefox 11 automatically?

    How to display the width of the page or the big screen in firefox 11 automatically? I know how to Ctrl +, ctrl - and ctrl 0, but is there a way to define 11 firefox to automatically set the page viewing by default "page width" or full screen (F11 not)?
    Help, please. Thank you.

    You can use an extension to set a page zoom and the size of the default font on the web pages.

  • How to display the drop-down list box in MS excel by using labview report generation toolkit? pleasepost code block diagram?

    How to display the drop-down list box in MS excel by using labview report generation toolkit? Please post the block diagram of the code so that I can able to generate from the drop-down list box in excel with the menu drop-down...

    Like this. (edition, use the reference forms instead of the reference to the worksheet)

    Ben64

  • How to display the name of my refnum on the front?

    I write data to a file. To do this, I use ' Open/create/replace the file' to prompt the user for a file name, which is then out of my VI as a refnum. I then write strings in this file with "write to a text file.

    How to display the name of the file (including the path) on the front panel once the user has entered it?

    Michael

    Use the Refnum at the path of e/s from file-> advanced file palette. You can wire it to a path indicator.

  • How to display the wireless in my xp on lenovo 3000n200 please show me shortened steps you

    How to display the wireless in my xp on lenovo 3000n200 please show me shortened steps you

    Hello

    1. do you have problems connecting to the wireless network?
    2. don't you make changes to your computer, after which the issue started?
    3. where exactly you want to display the wireless network?

    If you have problems to connect to the network, I would recommend that you reinstall the wireless network cards.

    Follow the steps in this article.

    http://support.Microsoft.com/kb/283658

Maybe you are looking for