5 pts.
 Select – Top 10
Hello, I have to tables, one with name CONTRACT, second AGENT IN table CONTRACT these data: ClientID ClientName ClientSurname ContractNR AgentID AGENT data: ClientID Sum ContractNR I need to select 10 agent's clients, who have a bigest sum. One agent have 100 clients, second only 2 or one client. Sum is very different. The result may be :      clientID                  contractId      AgentID     Sum 1     48504051021         000001         112          10,15 2     54847584527         000002         112          20,26 . . . 10   45985485425         0001251       112           200,32 1     85462455545         0000125       156           100,65 . . . 10    23654755875        000056         156           900,23

Software/Hardware used:
ASKED: November 2, 2009  9:02 AM
UPDATED: November 2, 2009  3:27 PM

Answer Wiki:
Thank you for visiting ITKE. We are happy to help you with solving specific IT questions, but need as much information as possible to do so. Let us know about the problem you are trying to solve, how you are approaching it and what work you’ve done so far, and we can help guide you in the right direction. I will give you a hint: SUB-SELECT and maybe a nested table expression.
Last Wiki Answer Submitted:  May 14, 2013  12:32 pm  by  Meandyou   5,205 pts.
All Answer Wiki Contributors:  Meandyou   5,205 pts. , Chris Leonard   2,620 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _