Can I do this using SQL?
From: dhruv <dhruvbird_at_gmail.com>
Date: 9 Feb 2006 03:55:57 -0800
Message-ID: <1139486157.184995.202500_at_g43g2000cwa.googlegroups.com>
Hello,
Maybe I'm missing something, but I can't figure out a way to write an SQL query for the floowing requirements:
Date: 9 Feb 2006 03:55:57 -0800
Message-ID: <1139486157.184995.202500_at_g43g2000cwa.googlegroups.com>
Hello,
Maybe I'm missing something, but I can't figure out a way to write an SQL query for the floowing requirements:
I have a table which holds accounts of customers. Now, the schema is as follows:
CUST_NAME, BRANCH_NAME, BALANCE, CUST_ID [ok, yes, it's not _actually_ like this, but this is the result of a join on some obviously normalized tables].
Now, I want to get a list of the TOP 10 Branches wrt. the number customers they have. How would I do that?
First I thought grouping or sorting would help, but sort on frequencey? How do I do that in SQL?
-Dhruv. Received on Thu Feb 09 2006 - 12:55:57 CET