What is wrong here?.

This query is working fine.....
SELECT emp_id,count(emp_id)
FROM emp
group by emp_id
having count(emp_id) > 1
This query is not bringing any result....why is that?. What
is wrong in this query?.
SELECT emp_id,emp_name,emp_sal
FROM emp
group by emp_id,emp_name,emp_sal
having count(emp_id) > 1

Probably because the group by emp_id,emp_name,emp_sal
combination is unique (distinct). In other words, you do not have
any cases where you have more than one row where the combination of
all three emp_id, emp_name, and emp_sal values are the same.
EDIT: Also, I sure hope that emp_id isn't the primary key of
your emp table, or any rows returned by your first query indicates
that you have a big problem (non-unique PK).
Phil

Similar Messages

  • Trying to enroll for the $99 developer account. Getting the message 'We are unable to process your request' What is wrong here?

    Have tried so many times now to enroll for the developer program and getting stuck in the third screen with the message
    We are unable to process your request.
    I need enrollment fast to put my app in the app store
    What's wrong here?

    Thanks for the detail.
    I believe you are doing your best, in the right place.  How long have you tried ?
    May be the sistem in your area is really busy. Can you wait few hours or contact them with a Message ?
    Or try a Service provider http://support.apple.com/kb/HT1434

  • I am using iphone5 and when sending sms within 160 characters i am getting 2 sms counts deduction & i hear the message send sound twice. what is wrong here. can some one please help me here???

    i am using iphone5 and when sending sms within 160 characters i am getting 2 sms counts deduction & i hear the message send sound twice. what is wrong here. can some one please help me here???
    APPLE need to do something here!!!!!!1

    Hi...
    Thanks for your repaly .
    and i am not bale to post a question in developer forum i tried hard but i didnt get .Can you plz explain me how to post a question in developer forum this is very helpfull for me.Because i never did this thing.

  • My Adsense Ads do not show on Wordpress Blog Sidebar. All that shows is a blank box. The Adsense ads show just fine in Internet Explorer. What is wrong here?

    Adsense Ads are not showing up on my WordPress Blog Sidebar. The same ads are showing on Internet Explorer, but not on my Firefox Browser. What is wrong here?
    http://www.BuyBeadsOnlineBestChoice.com

    Actually, my AdSense is set up to work differently on the actual blog post pages. If you look at this link
    [http://mytruckalogue.blogspot.​com/2012/03/going-back-to-​work-for-marten_20.html http://mytruckalogue.blogspot.​com/2012/03/going-back-to-​work-for-marten_20.html]
    there should be
    1.) a 300x250 block of yellow text ads just under the the post title
    2.) a 300x250 block of yellow text or image ads at the top of the sidebar, and
    3.) a 300x250 block of template color text or image ads just under the Blog Archive.
    Incidentally, I can't see my blog at all at this moment because my company has disallowed viewing personal websites and blogs on their wifi. REAL bummer! Sitting in my truck waiting for dispatch and can 't work on my blog :-(
    But I'd be grateful to know if anyone else can see these ads - I can, at least, view this website.
    Thanks much :-)

  • HT201299 After installing an app on iPhone 5s, I can't use it outside of wifi (using cellular or mobile data) and the app is not listed in settings to enable its use of mobile data - any clues on what is wrong here?

    After installing an app on iPhone 5s, I can't use it outside of wifi (using cellular or mobile data) and the app is not listed in settings to enable its use of mobile data - any clues on what is wrong here?

    Steps to take to resolve this issue:
    1/  Turn off Wifi
    2/  Ensure Mobile (cellular) data is on
    3/  Turn iPhone OFF and then ON (re-boot iPhone)
    4/  Without turning Wifi on, open an app that requires mobile (cellular) data.
    5/  The app will now show on the Settings list with the option to enable or disable mobile (cellular) data
    6/  In time all apps that require or use mobile data will be added to the list automatically.

  • My screen on my Iphone 3gs has lost it's light, Like, I have to hold it in some type of light to see it, what is wrong here?

    My screen on my Iphone 3gs has lost it's light, Like, I have to hold it in some type of light to see it, what is wrong here?

    This is called "no backlight problem". Try a Reset, hold both home and power buttons until the iPhone begins to restart, usually takes 10 seconds of holding both buttons.
    This problem is usually due to Liquid Damage to iPhone, either Logic Board component or LCD Display.
    If you have Warranty or AppleCare Coverage, hope it is not Liquid Damage and make Genius Reservation and take iPhone to Apple for resolution.

  • Perplexed as to what went wrong here

    ok so im writing this prog for school and im all but finished with it xcept im running into one small problem.
    i have 5 int objects each read individually by the program.
    what i need to to is to ad them all together which seems like it should be simple right.
    so i do it like this
    private int Total;
    public setTotal(int Total)
    Total = intA+intB+intC+intD+intF;
    all the int values are private as well
    but for some reason it wont total.
    am i doing something wrong here?
    i tested each value with
    ex:System.out.printline(intA);
    etc..etc... to make sure it was reading the values set and it prints them out fine (so i know each int is holding its value)
    any input would be greatly appreciated.

    i have 5 int objectsint is a primitive type. You have 5 int variables. Not objects.
    public setTotal (int Total) {
       Total = intA + intB + intC + intD + intF;
    }You are setting the value of the local variable Total (which is the parameter name) to the sum of the 5 int variables. To set the value of the instance field Total, usepublic setTotal (int Total) {
       this.Total = intA + intB + intC + intD + intF;
    }A note: by convention, variable names start with a lowercase letter. Your variable Total should be named total.
    Moreover, the setTotal method does not require a parameter.
    db

  • What's wrong here?

    Hi, im getting a strange output on parts 3 and 4 of my program, they are the same, when they should be different. Here is the output:
    Laboratory 3 written by me..
    Frog: Position = 6, hops = 100, max position = 11, min position = -1, number home = 8
    -------- Part 3 --------
    Experiment # 1: Frog: Position = -14, hops = 100, max position = 1, min position = -18, number home = 2
    Experiment # 2: Frog: Position = 6, hops = 100, max position = 10, min position = -6, number home = 15
    Experiment # 3: Frog: Position = 2, hops = 100, max position = 15, min position = 0, number home = 1
    Experiment # 4: Frog: Position = -2, hops = 100, max position = 0, min position = -14, number home = 1
    Experiment # 5: Frog: Position = -4, hops = 100, max position = 6, min position = -5, number home = 6
    Experiment # 6: Frog: Position = 6, hops = 100, max position = 12, min position = 0, number home = 4
    Experiment # 7: Frog: Position = 4, hops = 100, max position = 10, min position = -2, number home = 8
    Experiment # 8: Frog: Position = 8, hops = 100, max position = 13, min position = -7, number home = 1
    Experiment # 9: Frog: Position = 18, hops = 100, max position = 19, min position = -2, number home = 3
    Experiment # 10: Frog: Position = 8, hops = 100, max position = 9, min position = -6, number home = 14
    After 10 experiments:
    Average Position = 3.2
    Maximum Position = 19 // same as in part 4
    Minumum Position = -18
    -------- Part 4 --------
    Kirby hopped 50 times.
    After the experiment:
    Average Position = 19.5
    Maximum Position = 19 // same as in part 3
    Minumum Position = -18
    now heres the code for my frog class:
    package frogs;
    import java.util.*;
    public class Frog {
        private static Random rand;
        private int hops;
        private int numberHome;
        private int maximum;
        private int minimum;
        private int position;
        public Frog() {
            hops = 0;
            numberHome = 0;
            maximum = 0;
            minimum = 0;
            position = 0;
            rand = new Random();
             public int getHops(){
                 return hops;
             public int getMaximum(){
                 return maximum;
             public int getMinimum(){
                 return minimum;
             public int getNumberHome(){
                 return numberHome;
             public int getPosition(){
                 return position;
             public void hop () {
                 if (rand.nextInt(2) == 0)
                     position++;
                 else
                     position--;
                 if (position > maximum)
                     maximum = position;
                 if (position < minimum)
                     minimum = position;
                 if (position == 0)
                     numberHome++;
                 hops++;
             public void hop (int n){
                 for (int i = 0; i < n ; i++)
                     hop();
             public String toString(){
                 return "Frog: Position = " + position + ", hops = " + hops +
                         ", max position = " + maximum + ", min position = " + minimum + ", number home = " + numberHome;
    }heres my FrogTester class: ( i think the problem is in here, not sure though)
    package frogs;
    public class FrogTester {
        public static void main(String[] args) {
            System.out.println("Laboratory 3 written by Me. ");
            Frog kermit = new Frog();
                kermit.hop(100);
            System.out.println(kermit);
            System.out.println("-------- Part 3 --------");
            int averagePosition = 0;
            int maxPosition = 0;
            int minPosition = 0;
            for (int exp = 0; exp < 10; exp++){
                Frog aFrog = new Frog();
                aFrog.hop(100);
                System.out.println("Experiment # " + (exp+1) +": " + aFrog);
                averagePosition += aFrog.getPosition();
                if (aFrog.getMaximum() >maxPosition){
                    maxPosition = aFrog.getMaximum();
                if (aFrog.getMinimum() < minPosition) {
                        minPosition = aFrog.getMinimum();
      System.out.println("After 10 experiments: " );
      System.out.println("Average Position = " + (double) averagePosition/10);
      System.out.println("Maximum Position = " + maxPosition);
      System.out.println("Minumum Position = " + minPosition);
      System.out.println("-------- Part 4 --------");
                Frog kirby = new Frog();
                   int hops2 = 0;
                   while (hops2 < 50){
                        kirby.hop();
                        hops2++;
                        averagePosition += kirby.getPosition();
                     if (kirby.getMaximum() > maxPosition){
                         maxPosition = kirby.getMaximum();
                     if (kirby.getMinimum() < minPosition) {
                             minPosition = kirby.getMinimum();
                   System.out.println("Kirby hopped " + hops2 + " times.");
                   System.out.println("After the experiment: " );
                   System.out.println("Average Position = " + (double) averagePosition/10);
                   System.out.println("Maximum Position = " + maxPosition);
                   System.out.println("Minumum Position = " + minPosition);
    }Here's what the program is about just to be more clear:
    Random walks are used to model many physical phenomena, such as an ideal gas. In the 1-dimensional case, the walker flips a coin (randomly chooses 0 or 1) and takes one step left or right based on the outcome. In this laboratory will you develop a Frog class that represents a random walk on 1-dimensional line.
    The Frog starts at position 0. Each time the Frog hops, it randomly chooses a 0 or 1 and increments its position if a 0 is chosen or decrements its position if a 1 is chosen. The Frog also keeps track of the total number of hops it has taken, its current position, its minimum position (the most negative position that it has visited so far), and its maximum position (the most positive position that it has visited so far).
    Message was edited by:
    kevin123

    Even though your code format is ABSOLUTELY DIABOLICAL (you not heard of indenting?) I think I can see what your prob is.
    In part 4 you are not working out the average position by dividing by 10 even though there are 50 hops. (And you are not resetting the mi/max positions like the other dude said).
    Seriously, next time you post remove all that useless white space and indent properly. It helps a remarkable amount.
    Ted.

  • Logic crashes any time I record enable. Also, it won't quit normally. I have force close the application any time I want to quit. What's wrong here?

    From the moment I downloaded Logic it would not quit properly. It won't respond to cmd Q or going to the menu to quit the application. Then when I try to simply record enable a track, the whole thing bugs out and crashes, no matter how many times I restart, same result. This is not how $200 software should act. *** Apple?

    This is an oddity that happens if you upgrade from Leopard to Snow Leopard.
    Follow the instructions from here.
    http://support.apple.com/kb/TS3968
    Don't delete any more than they say in the article.
    This should help/fix your situation.
    You're right, Apple's software should not behave this way... however, a little background.
    Apple purchased this software at version 5.2 from another company, a highly respected company, it's coast at that time was $999.00, which is what I paid for it, it's professional software. Apple priced it at $499 for several years, when it moved to the app store it was reduced to $199, which is dirt cheap. It's all a matter of perspective.
    p.s. These are user forums, no one from Apple will respond here, or so they say!

  • What went wrong here?

    Like I said in the picture, I changed my font size and font family for one of my <p> in one of my divs. Why did this change carry over to all my divs and <p>'s? What did I do wrong and what can I do to fix it?
    I am using Dreamweaver CS6
    Thanks in advance for your help!
    Dalton

    Run your page through these validators and repair any errors...
    HTML: http://validator.w3.org/
    CSS: http://jigsaw.w3.org/css-validator/
    If that doesn't fix the issue, we'll definitely need to see your code to find the problem.

  • When I try to do in-app purchase to get the expansion package for civilization V, it fails and says that I need to contact itunes support to get help. What's wrong here?

    What should I do to solve the problem?

    Here is an extract from an Apple support link -
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.

  • OK, What's Wrong Here--Logic and Reason

    OK, before anyone goes off on me about this post, I have searched the topics in this forum and followed all the advice for hooking up Rewire applications (and the manual is absolutely useless on this, I might add). However, after creating two separate audio objects in the Environment (L and R Rewire channels) and assigning them to their own Bus, (see below)I still can't here any sound. I get to see the faders gleefully bouncing up and down as if they're saying "You can't hear me, You Can't hear me". Is there something in Logic 7.1 that's not covered in these posts about Rewiring or have I just missed something? Here's what I've done which I got from another post on this topic:
    Environment Window
    In the Middle section of the parameters on the Left select Create
    Name it Rewire
    Under that windows "New" pull down (Top Left), pull down to Audio Object
    In the "Channel" pop up (Left, bottom section) select>Rewire (Left, right, 3,4... What ever you want.
    Double Click the Audio Object to expand it
    Pan Left or right, or whatever you need.
    Rename if you wish
    Do the same for the other stereo side. Now's the fun part. Assign these stereo pairs to a bus (above the fader, the default is "Out 1-2")
    Go to the Mixer window
    Double click the Bus you assigned, this puts it in the arrange window
    Arrange window
    Name the Bus "Rewire" or "ReDrum" or something great like that.
    Been there. done that but still no sound. Thanks, as always, for your help.

    On a side note everyone, does anyone have trouble with Reason and Logic looping together? Everytime I try to get a Reason song to loop with Logic it might loop once or twice (or not at all) but Reason will eventually lock up and its playback marker will stick on it's right loop marker and I'll hear no sound from Reason as Logic just keeps on looping. Then, if I let Logic keep playing, Reason might sync-up and start looping with Logic again or more often it doesn't. Could take 5 to 10 times around before it catches again, if at all.
    I thought these types of issues were a thing of the past with modern software?
    What's the deal?
    Noah

  • Does not print the string value ? what is wrong here

    Hi,
    I am trying to print the string value that does not have spaces.
    when I do that,I dont get what I want i.e 3334445555.
    Any help in this regard is appreciated.
    Thanks
    Chat
    import java.util.StringTokenizer;
    class TestTokenizer{
    public static void main(String args[]){
              StringTokenizer st = new StringTokenizer(" 333 444 5555");
              String tokens[] =new String[3];
              int i=1;
              while (st.hasMoreTokens()) {
                   //System.out.println(st.nextToken());
                   tokens=st.nextToken();
              System.out.println(tokens.toString());

    also, be sure to format your code in your next post...click the code button at the top of the message box you type in, and past your code
    *here*[\code]                                                                                                                                                                                                                                                                                                                               

  • I am trying to print a spreadsheet. If I go into Print Preview, all I see on the screen is a blank page. What is wrong here? and

    I print stock spreadsheets at the end of every year for my records and this is the first time I can't print them. When the blank screen shows I can minimize it. The spreadsheet with my numbers shows but I can't print it. Something is blocking it.

    Reload the page. If it doesn't load, choose Activity from Safari's Window menu, find that picture in the list, and see what it says to the right; this may reveal what the problem is.
    (91827)

  • Can anyone see what is wrong here?

    Here we go.....I am working on an assessment at Uni. I have written the following code. It compiles with no errors.....it starts to run (ie it asks for the 2 file names to impliment the equi-join) but it doesnt seem to pass a return value. The program produces no output!!! HELP!!!
    private static Map equiJoin(Map relation1, Map relation2)
              Map resultRelation = new TreeMap();
              Iterator keys1Iterator = relation1.keySet().iterator();
              Iterator values1Iterator = relation1.values().iterator();
              Iterator keys2Iterator = relation2.keySet().iterator();
              Iterator values2Iterator = relation2.values().iterator();
              while (keys1Iterator.hasNext())     //loop through relation1
                   String primaryKey1 = (String)keys1Iterator.next();
                   String foreignKey1 = (String)values1Iterator.next();
                   while (keys2Iterator.hasNext())//loop through realtion2
                   String primaryKey2 = (String)keys2Iterator.next();
                   String foreignKey2 = (String)values2Iterator.next();
                   if (foreignKey1 == primaryKey2)
                   resultRelation.put(primaryKey1, primaryKey2 + "\t" + foreignKey2);
              return resultRelation;
         }

    You have to construct the second iterators inside the first while loop, otherwise you will always check against the value of the last key in the first iterator.
    private static Map equiJoin(Map relation1, Map relation2){
         Map resultRelation = new TreeMap();
         Iterator keys1Iterator = relation1.keySet().iterator();
         Iterator values1Iterator = relation1.values().iterator();          
         while (keys1Iterator.hasNext()){
              String primaryKey1 = (String)keys1Iterator.next();
              String foreignKey1 = (String)values1Iterator.next();
              Iterator keys2Iterator = relation2.keySet().iterator();
              Iterator values2Iterator = relation2.values().iterator();
              while (keys2Iterator.hasNext()){          
                   String primaryKey2 = (String)keys2Iterator.next();
                   String foreignKey2 = (String)values2Iterator.next();
                   if (foreignKey1 == primaryKey2)
                        resultRelation.put(primaryKey1, primaryKey2 + "\t" + foreignKey2);
         return resultRelation;
    }

Maybe you are looking for

  • WIS 10901 when trying to debug in ABAP

    Hi, We get a WIS 10901 in Webi when trying to debug in the MDX part of the ABAP stack with external breakpoints. I wonder how XI gets the event that ABAP stack should start the debugger. This usually works for other RFC connected applications as well

  • Score editor will not separate a single staff to the usual piano two stave.

    I am trying to separate a single staff of a particular region to two staves. Despite the fact I go to layout in the score editor and choose score styles and then I choose Piano - the usual two stave style- nothing happens on my currently selected sin

  • Web Module Output Sharpening question

    Is the web gallery output sharpening in LR2 only available when a web gallery template makes it available? I can't seem to find it under Output Settings for most of my installed gallery templates? I'm guessing that the developer has to make this avai

  • CORRECT SOLUTION FOR THE APPSTORE PROBLEM

    CORRECT SOLUTION (by AppleTeam) 1- Uninstall the old version of itunes you have (or just uninstall iTunes if you are already running 10.4.0.80 2- Uninstall Quicktime also 3- Uninstall Apple software update 4- Uninstall Apple mobile device support 5-

  • Some sound in movie not playing when viewing in full screen

    I have been editing a film for the past few days and I've regularly watched it back in full screen to see how it's coming along. Today however, I watched the film back and in some parts, the audio from some of the clips is very quiet. If I play back