| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Can I do this using SQL?
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 - 05:55:57 CST
![]() |
![]() |