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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top Values by group 1

Status
Not open for further replies.

kastaman

IS-IT--Management
Sep 24, 2001
181
CA
Hi there,

I'm creating a report where the top issues by business segment is reported. I followed the instructions in the Microsoft site:

but when I run my report, the Line of Business is appearing about 10 times with the same top 5 issues.

My tables are straighforward:
Line of business
Data

These 2 tables are joined by the product field.


Thanks in advance,

Kastaman
 
I'll take a stab at the query for you. Try this

SELECT TOP 5 [Line of Business].[Line of Business Field], Count(Data.[Issues Field]) AS [Issues]
FROM Data INNER JOIN [Line of Business] ON Data.Product = [Line of Business].Product
GROUP BY [Line of Business].[Line of Business Field];
Trisha
padinka@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top