Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Brain Storming 2

Status
Not open for further replies.

jmandiaz

IS-IT--Management
Apr 22, 2001
110
US
Hi Guys,
I have stand alone table with the following fields.
taxid-acctnbr,name,currbal
I want to be able to query the table for every relationship over 100k.

for example john doe has 4 accounts with 25k i need to be able to display john doe.

what would be the best way do this. Thanks in advance

-Jaime
 
I think this would return one row per name where the sum >= 100K:

SELECT taxid-acctnbr, name, Sum(currbal) AS SumBal
FROM MyTable
GROUP BY taxid-acctnbr, name
HAVING (((Sum(currbal))>=100000));

Good luck! --BoulderRidge
 
Something like this ?
SELECT [name], Sum(currbal) As relationship
FROM theTableName
GROUP BY [name]
HAVING Sum(currbal)>=100000
;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You guys rock thanks again for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top