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!

Query to find statistical informtion

Status
Not open for further replies.

seducedbycodes

Technical User
Jul 4, 2005
27
AU
Hi, just wondering what would be the best way to find statistical information about a customer (ie the number of quotes for that company and the total cost quoted by the company)

There is a table which contains company info and quote info but the number of quotes for a particular company, and total cost is not stored anywhere.
Can this all be done using a query
Thanks in advance
 
something like this

SELECT CompanyID, CompanyName, COUNT(*) as totalquotes, SUM(Price) as Totalcost FROM Mytable Group By CompanyID

-DNG
 
modification:

GROUP BY CompanyID, CompanyName

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top