SQL help, how to group by column A and then get top frequency of column B?

Assuming the following table, operation represents each kind of transaction operation
table operation employee other 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, and then get the frequency of employee, and get the top 1 or top 2 frequency highest.
But I am stuct, and do not know how to write the sql.

998408 wrote:
Assuming the following table, operation represents each kind of transaction operation
table operation employee other 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, and then get the frequency of employee, and get the top 1 or top 2 frequency highest.
But I am stuct, and do not know how to write the sql.Welcome to OTN. Ops! posted in wrong forum. Just post in {forum:id=75}. Before posting there close this thread marking as answered.
If someone's response is helpful or correct, please mark it accordingly.*

Similar Messages

  • Urgent help needed - new to Macs, accidently cut and paste over top of photo folder and now no sign of folder or file, no auto back-up in place, how can I restore photos pls

    Urgent help needed - new to Macs, accidently cut and paste over top of photo folder and now no sign of folder or file, no auto back-up in place, how can I restore photos pls

    Thanks for prompt reply, yes we have tried that but have now closed down the browser we where the photos were.
    We haven't sent up time machine, do you know whether there is any roll-back function on a Mac?
    Thanks

  • Have an ipod and then got the wife an iphone4. all passwords are screwed up. she can not access playstore cuz she doesn't have password. i can not get find any help on how to get or update a password for the ipod. and then get her a separate password for

    have an ipod and then got the wife an iphone4. all passwords are screwed up. she can not access playstore cuz she doesn't have password. i can not get find any help on how to get or update a password for the ipod. and then get her a separate password for her iphone. we need to save her photos, music, etc to ? icloud and the phone stuff to verizon cloud? so when she gets her new Iphone6 she can have all her "stuff" back on the new phone. hope this makes sense. please offer suggestions here or at [email protected] thanks for your help!

    Oh no! I'm sorry to see there's a lot of confusion here and data shared, x-rayDon. We can definitely work to fix. This happens when two devices share the same Apple ID, so she will need to reset hers. She can do so by assessing this link Apple - My Apple ID. You will need to decide who will keep the account if want separate Apple IDs since purchases cannot be shared unless you do Family Sharing.
    RobinD_VZW
    Follow us on twitter @VZWSupport

  • How to group all the reports and execute like single application ?

    Hi,
    I am trying to develop some reports in Crystal Reports XIR2 , here i have Design and Preview options that is for every report i should see , how to group all the reports and execute like single application?
    any option is there to run the report
    i mean is it possible to have a home page from there have links to each report and when i click on the link corresponding report should be shown , if it is possible , How?
    Regards,
    kathyaini

    You will want to look into Crystal Reports Server, it does exactly what you describe and more:
    http://www.businessobjects.com/product/catalog/crystalreports_server/
    Download a trial of CR Server here:
    http://www.businessobjects.com/product/freetrials.asp

  • How can i hide a JFrame and then Show it again in runtime

    How can i hide a JFrame and then Show it again in runtime??
    Please, please help me
    Its URGENT

    Here's even an example:
    import javax.swing.*;
    public class HideAndShow extends JFrame
         public HideAndShow()
              super("Hello");
              setSize(200, 200);
              setVisible(true);
              try
                   Thread.sleep(2000);
              } catch(InterruptedException e) {}
              setVisible(false);
              try
                   Thread.sleep(2000);
              } catch(InterruptedException e) {}
              setVisible(true);
         public static void main(String[] args)
              new HideAndShow();
    The JFrame will show, then hide, then show again. This is at runtime.

  • I want to delete a few contacts, apps, pics etc from my iphone, but when I delete and connect to my laptop they sync and come back again. How can I delete those items and not get them back when I connect my iphone to my laptop?

    I want to delete a few contacts, apps, pics etc from my iphone, but when I delete and connect to my laptop they sync and come back again. How can I delete those items and not get them back when I connect my iphone to my laptop?
    Also where exactly on the laptop is teh data stored.
    Thank you!!

    go to 'Edit' in the menu bar. Then choose 'Preferences'.
    you'll see a pop-up and there's a tab called 'Devices' there. If you click that, you will be able to check a box that says 'prevent automatic syncing for iPods, iPads and iPhones' or something like that.
    Hope this helps
    NB: if you don't even see the menu bar that has options like 'File, Edit, View, etc', first click the black/white square button on the top left of your screen, and then click 'show menu bar'. It should pop right up.
    Good luck

  • How to open a pdf file and then attach it with images

    I am new to Indesign Server.
    I'm currently working on a pdf.
    I have a white blank pdf template.
    that I want to attach/glue it with images.
    How to open a pdf file and then attach it with images.
    Please, help me.
    Thanks.

    First step would be to make yourself familiar with InDesign desktop version.
    Whatever you intend to achieve, do it there manually. (see regular app docs or forums)
    Then try to automate your steps with scripting (see scripting docs or forum)
    If you can do it with a script in the desktop version, that script will likely also run in ID Server. (see server forum).
    If you can specify missing features not achievable thru scripting or manual use, reconsider to write a plugin (this forum).
    A seasoned C++ programmer will need a few months to learn the basics, wade thru tons of documentation etc. Alternatively consider to hire a consultant to do the development work for you.
    Dirk

  • When I drag ANY JPEG into a new folder of ANY kind, I get an alias, not an original. And, when I drag aliases onto a  blank disk to burn it, I get burned aliases, NO originals. That's what I'm asking. How do you drag a JPEG and NOT get an alias?

    When I drag ANY JPEG into a new folder of ANY kind, I get an alias, not an original. And, when I drag aliases onto a  blank disk to burn it, I get burned aliases, NO originals. That's what I'm asking. How do you drag a JPEG and NOT get an alias?

    Finder Help describes how to move, copy etc.
    As well, Apple - Support - Discussions - Moving or Copying Files and ...

  • HT4972 I can't update my iPad to iso 5 please help. When I go to settings and then to general it doesn't have an update button for "check for updates". Thanks

    I can't update my iPad to iso 5 please help. When I go to settings and then to general it doesn't have an update button for "check for updates". Thanks

    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 6.0.1. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

  • Firefox connects to google-analytics for some sites, and then gets stuck, and I can never get onto the site. How do I prevent Firefox from connecting to google-analytics? I use XP with service pak 3 in English

    Firefox connects to google-analytics for some sites,when i click on links in websites or emails and then gets stuck, and I can never get onto the site. Or opens a new bower behind the one i'm usind that's blank i don't even know it's there untill i close the one i'm using. How do I prevent Firefox from connecting to google-analytics? Or opening a blank bowser behind the one i'm using. I use XP with service pak 3 in English
    == This happened ==
    A few times a week
    == a couple months ago

    I got the same issue.
    I go on a website and all the sudden another window pops up with "results.google-analytics.com" or "search.google-analytics.com". It has often ads for other sites for example. black single dating site
    how can I can I stop that from happening again?
    I didn't download or do anything, just visit websites, that I visit on a regular basis.
    OS: Windows XP
    Firefox Version: 3.6.6

  • How do I add a shape and then add gradient inside of it ?

    how do I add a shape and then add gradient inside of it ?

    Reader commenting and markup tools do not support gradients.

  • How do I create a signature,and then add it to an e ailed document?

    How can I create a signature and then use it to sign a document in e mail?

    Not sure I understand the question correctly.
    Open Mail and click on Preferences under the Mail menu. Click on the Signatures icon in the toolbar. You can set up your signatures there.
    But if you are talking about adding a written signature, then you cannot do that within Mail. You would need to scan in an image of your written signature then manually add it to a signature you create in mail as a graphic image. That seems to work.

  • How to remove xcode 4.1 and then install xcode 3.2.6?

    how to remove xcode 4.1 and then install xcode 3.2.6?

    Just an FYI I had xcode 3.2 installed on my snow leopard system and have today just installed Lion and I just cleaned and rebuilt an App I had developed prior to the Lion install to test to see if it would work. I was told it would but wanted to make sure and it successfully rebuilt and works in the simulator.
    My issue is a bit different I need to install 4.1 WITHOUT corrupting my 3.2 installation as I may have to go back to rebuild a 3.2 App as we had a fairly unique setup for our xcode. The problem as I see it currently is I do not know how LION installs things in LION xcode is an App downloaded from the App store but I need to be able to download to something other than the default directories and I am not sure if I have that option in LION when installing an App(xcode) from the App Store

  • TS3899 I upgraded to IOS 6, I am unable to get into my Yahoo mail.  It accepts pw, and pops up and tells me how many e-mails I have and then goes right back to the sign on screen. verified that I can get in from laptop & wireless is functioning.any sugges

    I upgraded to IOS 6, I am unable to get into my Yahoo mail.  It accepts pw, and pops up and tells me how many e-mails I have and then goes right back to the sign on screen. verified that I can get in from laptop & wireless is functioning.any suggestions?

    Purplehiddledog wrote:
    I do backup with iCloud.  I can't wait until the new iMac is available so that I can once again have my files in more than 1 location without needing to rely solely on the cloud. 
    I also rely on iTunes and my MacBook and Time Machine as well as backing up to iCloud. I know many users know have gone totally PC free, but I chose to use iCloud merely as my third backup.
    I assume that the restore would result in my ability to open Pages and Numbers and fix the problem with deleting apps, but this would also mean that if my Numbers documents still exist solely within the app and are just not on iCloud for some reason that they would be gone forever.  Is that right?
    In a word, yes. In a little more detail.... When you restore from an iCloud backup, you must erase the device and start all over again. There is no other way to access the backup in iCloud without erasing the device. Consequently, you are starting all over again. Therefore, it would also be my assumption that Pages and Numbers will work again and that the deleting apps issues would be fixed as well.
    If the documents are not in the backup, and you do not have a backup elsewhere, the documents could be gone forever.

  • How to uninstall iTunes in mac and then install again

    how to uninstall iTunes in mac and then install again

    You should be able to simply visit: http://www.apple.com/itunes/download/ to download iTunes, and run the installer to overwrite your previous version...
    Lamborghini98 wrote:
    I want this because i can't restore my iphone 4 with my mac
    I don't think this will fix your problem with restoring your iPhone 4 though. That is likely a seperate issue.
    but i can do it with any windows?
    Yes, you can theoretically restore your iPhone with any computer running the most current version of iTunes (10.6.3) unless there is some other issue.
    I get error code(21)
    According to this support article: http://support.apple.com/kb/TS3694#error21:
    "These errors typically occur when security software interferes with the restore and update process. FollowTroubleshooting security software issues to resolve this issue. In rare cases, these errors may be a hardware issue. If the errors persist on another computer, the device may need service."
    Do you run any anti-virus or third-party firewalls on your computer? Try disabling them and trying the restore process again. It may be possible that one of these security applications is interfering with the iPhone's ability to authenticate with Apple's servers.

Maybe you are looking for

  • Error during Goods Receipt:Check table XMCHB: Entry 'Material no.', 'Plant

    Dear All, I am trying to post Goods Receipt for a Stock Transport Order. The error message appears as " Check table XMCHB: entry 'material no.' 'plant', '____' , 'batch no.' does not exist. (message no. M7001) The Supplying plant stock from which Goo

  • Mac Pro 3,1 Early 2008 andAplle 27inch Monitor

    I have a Mac Pro model 3,1 (Early 2008) with a ATI Radeon HD 2600 graphics card. I would like to use one of the new Apple 27inch displays - however they are either connected with the Thunderbolt connector or the Mini Display Port. Which models of the

  • Is iphone 6 IOS interrupt driven?

    Is iphone 6 IOS interrupt driven ?

  • Finding special characters in the column

    Hi, Need a help to find out the special characters in the column. since the data is loaded from external files like excel etc.., there are some special characters are got inserted in the column. how do i find out the rows in the column which has spec

  • Aia:isLoggingEnabled

    In the AIA config file we have trace.log.enabled to true at system level and nothing is set at service levels. But where are the loglevels defined? This always returns true irrespective of the logLevel I pass, what conditions does it return false? I