SQL help, how to group in column A and then get a higher frequency in column B?

Assuming that the following table, operation represents each type of operation of transaction
Employee table operation another column c
' < ' id1
' < ' id1
' < ' id2
' *' id3
id1 ' / '.

question, for each operation, which employee do the most? which employee do the 2nd most?
I thought I need to group by operation first, then get the frequency of the employee and get top 1, or at the top of page 2 of higher frequency.
But I'm struct and don't know how to write sql code.

998408 wrote:
Assuming that the following table, operation represents each type of operation of transaction
Employee table operation another column c
'<'>
'<'>
'<'>
' *' id3
id1 ' / '.

question, for each operation, which employee do the most? which employee do the 2nd most?
I thought I need to group by operation first, then get the frequency of the employee and get top 1, or at the top of page 2 of higher frequency.
But I'm struct and don't know how to write sql code.

Welcome to OTN. OPS! Posted in the wrong forum. Just after in {forum: id = 75}. Before posting it close this thread as answered marking.

If someone answer is useful or appropriate, please mark accordingly. *

Tags: Oracle Development

Similar Questions

  • How to delete everything on computer, and then reinstall all?

    Quests? Do someone know how to delete everything on computer, and then reinstall all? Have a dvd restore cd, but it's not working.

    Receive a toshiba computer: Windows Xp Home Edition Sp2, 1, 73Ghz, 503 MB Ram. Cause there is some problems with the computer, so I have to erase everything.

    Hello

    Boot from the recovery disc using the button 'C' at the beginning.
    The laptop should begin to boot from the disc. Then simply choose the standard recovery procedure, and the restore process will start.

  • Need help how to group information using bi publisher of learning.

    I'm new to bi publisher and I'm lost.  I want to have a group and display the program once type at the top of this group.
    So, I want to display each role information that correspond to this group located below.

    My program_type group of the top poster and curls.
    The rest of the prints some information, but not with the appropriate group.    I have my sql, I got my information and sorted but I do not group the information into my sql.

    I don't know if that should happen in my sql before I exported the information in xml format.

    I'd appreciate any help or tutorial that will lead me in the right direction.

    MY MARKUP

    <? for-each-group: ROWSET1_ROW; / PROGRAM_TYPE? > <? type: PROGRAM_TYPE? > <? PROGRAM_TYPE? >
    <? for-each: ROWSET1_ROW? > <? PROGRAM_CODE? >
    <? Program name? >
    <? PROGRAM_DESCRIPTION? >
    <? FINANCIAL_PROG_NAME? > <? end foreach? >
    <? the end for the Group? >

    How IT DISPLAYS


    Theatre
    TV
    Activity |  ACTD |
    code |             |
    03. SHOW | Good Times |  TEST1
    03. SHOW | Jeffersons |   TEST1
    04. MOVIE | Transformers |   TEST1
    04. MOVIE | SpiderMan |   TEST1
    04. MOVIE | The planet of the apes | TEST1

    MY XML


    <? XML version = "1.0" encoding = "UTF-8"? >
    < DATA >
    < ROWSET1 >
    < ROWSET1_ROW >
    < PROGRAM_CODE > 03 < / PROGRAM_CODE >
    See THE < PROGRAM_DESCRIPTION > < / PROGRAM_DESCRIPTION >
    the good times < program name > < / program name >
    TV < PROGRAM_TYPE > < / PROGRAM_TYPE >
    Test1 < FINANCIAL_PROG_NAME > < / FINANCIAL_PROG_NAME >
    < EFFECTIVE_START_DATE > 10/01/2000 < / EFFECTIVE_START_DATE >
    < EFFECTIVE_END_DATE > < / EFFECTIVE_END_DATE >
    < / ROWSET1_ROW >
    < ROWSET1_ROW >
    < PROGRAM_CODE > 03 < / PROGRAM_CODE >
    See THE < PROGRAM_DESCRIPTION > < / PROGRAM_DESCRIPTION >
    < Program name > Jeffesons < / program name >
    TV < PROGRAM_TYPE > < / PROGRAM_TYPE >
    Test1 < FINANCIAL_PROG_NAME > < / FINANCIAL_PROG_NAME >
    < EFFECTIVE_START_DATE > 10/01/2000 < / EFFECTIVE_START_DATE >
    < EFFECTIVE_END_DATE > < / EFFECTIVE_END_DATE >
    < / ROWSET1_ROW >
    < ROWSET1_ROW >
    < PROGRAM_CODE > 04 < / PROGRAM_CODE >
    FILM of < PROGRAM_DESCRIPTION > < / PROGRAM_DESCRIPTION >
    Processors of < program name > < / program name >
    Theatre of < PROGRAM_TYPE > < / PROGRAM_TYPE >
    Test1 < FINANCIAL_PROG_NAME > < / FINANCIAL_PROG_NAME >
    < EFFECTIVE_START_DATE > 10/01/2000 < / EFFECTIVE_START_DATE >
    < EFFECTIVE_END_DATE > < / EFFECTIVE_END_DATE >
    < / ROWSET1_ROW >
    < ROWSET1_ROW >
    < PROGRAM_CODE > 04 < / PROGRAM_CODE >
    FILM of < PROGRAM_DESCRIPTION > < / PROGRAM_DESCRIPTION >
    SpiderMan < program name > < / program name >
    Theatre of < PROGRAM_TYPE > < / PROGRAM_TYPE >
    Test1 < FINANCIAL_PROG_NAME > < / FINANCIAL_PROG_NAME >
    < EFFECTIVE_START_DATE > 10/01/2000 < / EFFECTIVE_START_DATE >
    < EFFECTIVE_END_DATE > < / EFFECTIVE_END_DATE >
    < / ROWSET1_ROW >
    < ROWSET1_ROW >
    < PROGRAM_CODE > 04 < / PROGRAM_CODE >
    FILM of < PROGRAM_DESCRIPTION > < / PROGRAM_DESCRIPTION >
    planet of the apes < program name > < / program name >
    Theatre of < PROGRAM_TYPE > < / PROGRAM_TYPE >
    Test1 < FINANCIAL_PROG_NAME > < / FINANCIAL_PROG_NAME >
    < EFFECTIVE_START_DATE > 10/01/2000 < / EFFECTIVE_START_DATE >
    < EFFECTIVE_END_DATE > < / EFFECTIVE_END_DATE >
    < / ROWSET1_ROW >
    < / ROWSET1 >
    < / DATA >

    Howard

    Found the answer in the next post

    How you group themes

    answer:

    Yes, you can achieve this by using the data model. Read the 5.6.2 XML Editor User Guide (Chapter 9) for more details.

    Link to the document

    http://www.Oracle.com/technetwork/middleware/bi-Publisher/documentation/xmlpenterprise562userguide-130839.PDF

    sample






    Thank you

  • How to group multiple columns at the same level and sum one

    With the following XML data, I want to simulate the following query in the model. Exactly how can I accomplish this?

    Thank you
    Kurzweil4

    < pre >
    < G_MAIN >
    < LINE_CREATION_DATE > 17 December 09 < / LINE_CREATION_DATE >
    XYZ < ITEM > < / ITEM >
    HHOENT < PLANNER > < / PLANNER >
    < ITEM_TOT_PEND_QTY > 7000 < / ITEM_TOT_PEND_QTY >
    COMPANY ABC < client_name > < / client_name >
    < CATEGORY_SEGMENT1 > UU98 < / CATEGORY_SEGMENT1 >
    < OSTAND_QTY > 1000 < / OSTAND_QTY >
    SHIP_001 < LOCATION > < / LOCATION >
    JJK < SHIP_FROM_ORG > < / SHIP_FROM_ORG >
    < ITEM_TOTAL_OSTAND_QTY > 38000 < / ITEM_TOTAL_OSTAND_QTY >
    < / G_MAIN >
    < G_MAIN >
    < LINE_CREATION_DATE > 17 December 09 < / LINE_CREATION_DATE >
    XYZ < ITEM > < / ITEM >
    HHOENT < PLANNER > < / PLANNER >
    < ITEM_TOT_PEND_QTY > 7000 < / ITEM_TOT_PEND_QTY >
    COMPANY ABC < client_name > < / client_name >
    < CATEGORY_SEGMENT1 > UU98 < / CATEGORY_SEGMENT1 >
    < OSTAND_QTY > 1000 < / OSTAND_QTY >
    SHIP_001 < LOCATION > < / LOCATION >
    JJK < SHIP_FROM_ORG > < / SHIP_FROM_ORG >
    < ITEM_TOTAL_OSTAND_QTY > 38000 < / ITEM_TOTAL_OSTAND_QTY >
    < / G_MAIN >
    < / pre >

    < pre >
    SELECT
    LINE_CREATION_DATE,
    AGENDA,
    PLANNER,
    ITEM_TOT_PEND_QTY,
    CLIENT_NAME,
    CATEGORY_SEGMENT1,
    LOCATION,
    SHIP_FROM_ORG,
    ITEM_TOTAL_OSTAND_QTY,
    sum (OSTAND_QTY)
    Of
    table-name
    Group
    LINE_CREATION_DATE,
    AGENDA,
    PLANNER,
    ITEM_TOT_PEND_QTY,
    CLIENT_NAME,
    CATEGORY_SEGMENT1,
    LOCATION,
    SHIP_FROM_ORG,
    ITEM_TOTAL_OSTAND_QTY
    < / pre >

    http://winrichman.blogspot.com/search/label/grouping

    Certainly, we can group any level that you want

    for each group with data semi flattened

    Count and sum based grouping (could be linked to the crosstab)
    How to make a total in my model?
    Where is my Total issue

    
    
    
    

    It's a group on the Date of creation
    or

    
    
    
    

    It's a grouping on the POINT

    or

    
    
    
    

    It's a grouping on the POINT and PLANNER

  • How to group on the left and right audio tracks of a. OMF file?

    Hi, I'm changing the sound of my short film, I sent one. OMF to audition for the first, but the left and right channels are separated in the multitrack session tracks, how would group them so whatever I do to a channel, will be the other

    This is because the OMF specification requires mono audio files

    It really depends on what you're trying to do with the two tracks as the best answer to the extent of the 'group '.

    You can select all the clips on the tracks and right mouse click on and select "group".

    You can send two channels to a bus

    You can export the two lanes to a stereo file and that bring in the session

    Many more things I know not but a little more details about what you're trying to do would help

  • How can I make the biscuit and then break for both sides and have a few small pieces?

    Hello

    Please tell me...

    How can I make the biscuit in AE and then break for both sides and has a few small chips fall?

    any help would be so appreciated...

    Strictly within EI, you have two options. Breaking with custom maps shatter and masking + particle effects. Wouldn't conviceing as Dave.

    If you have access to a 3D application (blender is free) you can do it here.

    This is a project of 2 minutes in AE with a stock image:

    with one broken high buscuit animated to adjust to the split, it might be unconvincing.

    Here's the project CS6 ASP file for you to play with. Take a look at all the elements to see how it worked by selecting all layers, then pressing the key u twice to see what I changed.

  • Substitution of the class, how to create the child class and then the base class

    I started to write a program for a DMM smart, that the problem is all versions of DMM greet the change company communication.

    My idea is to write a child class for each version, DMM and each Subvi child will replace the Subvi base class.

    My problem is, I first want to create a child class and after I see everything is working, start creating the base class. in this way, I'll see if think the right way.

    My question is

    How can I create a child class and then create the base class and configure the Subvi class of the child to be the substitution of the base class?

    I tried searching in the property of the class, but I don't see anything.

    Thank you

    This can be done and I did on occasion.

    You create the base class with the methods of dynamic distribution, you need (Connector components must be identical to those of the class of the child).

    Set then the legacy of the class inherits this base class.  If your method is defined as a dynamic distribution method in the parent, you will probably now have some errors (unless your method of child was already DD, in which case you might be OK already).

    To change the inheritance of a class, right-click on the properties of the class in your project, and then select Properties.  According to me, the tree of estate is at the lower end of the property.  Click on the 'legacy of change' (or something similar) to choose the class from which you now want to inherit.

  • How to duplicate a smart object and then modify it, without affecting the original?

    I have an element of vector illustrator that I am placed in a t-shirt mockup in photoshop. I have the provision essentially how I want, but I'm trying different color variations. I think that simply duplicate the initial placement and then change the color of the copy resulting, but this affects both the copy and the original. I looked into it a little further and found that I should try the option "replace contents" under smart objects, and that it would change the copy. Then I go back to illustrator, made a copy of the original vector and then the color change I had in mind and then saved as a separate document that I could use then by replacing the contents of the copy. However, still affects two smart objects!

    I tried this like linked smart objects and smart objects shipped without success.

    In the end, I just want to maintain the position of the original layer with the layer duplicated and edited. If you know a better way, please share!

    Layer > Smart Object > new Smart Object by copy. It forks a new, independent so (cut and paste or duplicate maintains the link between them).

    When you double-click the SO thumbnails in the layers panel, it opens the SO in the main application, in this case to have.

    Do Save your changes (not save money, unless you want to distribute the SO in a separate file, normal).

  • SQL Help: How to collect summary number in group by?


    Hello

    I have the following table:

    create table tb_class_info (classNbr number (5), number (2) of ClassType, classTeacherNbr number (4));

    insert into tb_class_info values (101, 1, 12);

    insert into tb_class_info values (001, 2, 12);

    insert into tb_class_info_values (001, 2, 13);

    insert into tb_class_info_values (002, 2, 12);

    insert into tb_class_info_values (002, 2, 12);

    I would like to get statistics on the cnt, cnt for classType = 2 classTeacherNbr classNbr. I expect to have the following results:

    classNbr classType2Cnt classTeacherCnt

    101                0                         0

    001                2                          2

    002                2                          1

    The following SQL code I use:

    SELECT classNbr,

    SUM (CASE when classType = 2 THEN 1 ELSE END 0) as classTypeCnt,

    SUM (CASE when classType = 2 SO unique classTeacherNbr ELSE 0 END) as classTeacherCnt

    OF tb_class_info

    GROUP BY classNbr;

    However, I have the ' ORA-00905: lack of keyword ' error. Any suggestion on this subject?

    Thanks for your help!

    Select classnbr

    sum (case when classtype = 2 then 1 end)

    , count (distinct case when classtype = 2 then teachernbr end)

    of tb_class_into

    Classnbr group;

  • How the Group of columns in the tabular section?

    I have a table have many columns, how to hardcode in a few columns combined text group name1 and remains of columns in Group 2?

    Summit theme universal - 42

    development environment: apex.oracle.com

    TB form group column.PNG

    Ramani_apex wrote:

    I have a table have many columns, how to hardcode in a few columns combined text group name1 and remains of columns in Group 2?

    Summit theme universal - 42

    development environment: apex.oracle.com

    Why "Group 1" appear twice? If there are only two groups involved then all columns of 'Group 1' must be contiguous, followed by all the columns "group 2"(otherwise there are actually three groups...)

    1. create a copy of the Standard report template. Notice that the model contains a hard-coded column layout names of columns of that group it can be used only for tabular forms and reports containing this specific set columns in this provision and it must therefore be appointed accordingly.

    2. change the new report template, the definition column header before changing to:

    
      Group 1Group 2Group 3
    

    3. edit the report used in the region in a table in the new model model.

  • Fire Fox is running slow internet everywhere on advice how fix said click the menu, and then select the help option there is no help option in the menu

    Surely someone must have tried this before implementing a solution that cannot possibly work

    Hello Rusty8899, you can find help here:

  • Windows Defender turned OFF and I can't turn on. Is it because I have downloaded Windows Security Essential? If so, how can I uninstall Windows Defender, and then reinstall it.

    My Windows Defender turned OFF and I can't turn on.

    Is it because I downloaded Windows Security Essentials?

    If yes how can I uninstall Windows Defender from my computer because it does not show in the control panel

    Hello

    MSE disables by default the Defender

    and no you can not uninstall then reinstall the Defender

    It is part of the vista operating system

    read this information on the Defender:

    ·                         If you use microsoft security essentials avg avira mcafee norton etc they disable the vista version of windows defender by default

    the basics of Microsoft security has its own version of windows defender

    and other anti-virus programs use their own particular type of application to scan for spyware and malware

    It of nothing to worry and is the default action, which is designed for them to do

    and if you need to change startup programs read this information on the other methods of doing it without using defender

    using msconfig read this tutorial;

    How to use MSCONFIG in Windows Vista

    Here's how to use MSCONFIG in Windows Vista to disable some unnecessary programs that load automatically at startup

    http://netsquirrel.com/Msconfig/msconfig_vista.html

    and also try this program;

    This utility, which has a knowledge of auto-starting locations of any startup monitor, shows you what programs configured to run at system startup or login and that the entries in the order of processing windows. These programs include those in your startup folder, Run, RunOnce, and other registry keys. You can configure Autoruns to show other locations, including Explorer shell, toolbar extensions, helper objects to the browser, Winlogon notifications, auto and many start-up services more

    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902

  • How can I correct D 0 and 0 get replaced by 0D 0a in the written text file?

    Hello

    I'm using LabVIEW 2009. As I am currently using LabVIEW for my diploma, I'd appreciate any help on my problem. So here's my problem:

    The VI I wrote it constantly reads data out of a VISA Serial Port and the string obtained is saved in a text via "writing text file.vi" file (The "write to the binary" produces additional data (for the most part, 00 s) I don't want to have in my data.) But when I open the text file and try to analyze the data that each instance of 0a or 0D is replaced by 0D 0. If the data is already 0D 0 what would not be affected.

    Does anyone have a solution for this problem?

    Thank you for taking the time to read my question...

    What happens if you do a right click of the 'writing on a text file' and uncheck the box "convert EOL?

  • How to read a text file and then view the content as a string

    I also want to strip the string from a certain substring, and convert the string into an array of floating-point numbers. I thought the use of playback of the worksheet vi, but I not know exactly if it will work. Any help would be greatly appreciated.

    It is here that 8.6. All you had to do was wire the 'chain after' the chain of worksheet to the table.

  • help sites Web copy to the Clipboard, and then paste it on Facebook

    Hello...

    How can I copy and paste all the web pages I want to paste it into Facebook. In my Touchpad.

    When I click on the address of the Web site, at the top of the page, it, correctly, highlights the entire address, however, in the drop down menu, on the left, there is no option exemplary editing past etc.

    In addition, the only other way I found, is to try to send the link, then try to copy the link in the email send, however, that e-mail is the name of the web page text, providing a link to the page. So I can not stick to Facebook from the email.

    Am I mistaken.

    can I ask function to copy the web address to the Clipboard.

    Also is there an easy way to copy the web address on the Clipboard so you can paste facebook.

    Thank you. :-)

    Here's how:

    Press and hold on the link.  Depending on how long you hold that it can produce two results - for me, this usually points to the whole link then keyboard appears and the cursor go to the link.  Not a problem, now tap and hold your finger there until the bubble 'Select Select all stick them' opens.  Tap "select all" and the link has been copied to the Clipboard.  To where you want that it stuck and just hold your finger on the screen until the bubble even opens.  Choose 'Paste' and the link.

    From time to time, it works as it should - press and hold the link, it becomes yellow, tap again and the 'Copy' option bubble will appear.  I think that it depends on to know if the keyboard is displayed when you press the link.  Keyboard upwards and you touch & hold = "cut copy paste" dialog, keyboard facing downwards = the dialog box "select Select all paste them.

    HTH,

    WyreNut

Maybe you are looking for