R
rpw
Hi,
I'd like to be able to print a report that prints the top 3 of each group.
However, when I try modifying the SQL to begin with "SELECT TOP 3", I get
only 3 records (apparently those that have the largest DesignerID number).
Here's my current SQL that lists all records by group:
SELECT tblSales.SalesAmount, tblDesigner.DesignerID,
tblDesigner.DesignerFirst, tblDesigner.DesignerLast, tblGroup.GroupName,
tblLocation.LocationName, tblSales.NumberSales, tblSales.NetLeads,
tblGroup.GroupID
FROM tblLocation INNER JOIN (tblGroup INNER JOIN (tblDesigner INNER JOIN
tblSales ON tblDesigner.DesignerID = tblSales.DesignerID) ON tblGroup.GroupID
= tblDesigner.GroupID) ON tblLocation.LocationID = tblDesigner.LocationID;
I'd like to know how to get the report to look like:
Group One
Sally $23,000
Sue $22,000
Sam $21,000
Group Two
Joe $44,000
Jay $39,500
Mary $35,780
Group Three
(list the top three of the group and so on for each group)
Thanks for any help,
I'd like to be able to print a report that prints the top 3 of each group.
However, when I try modifying the SQL to begin with "SELECT TOP 3", I get
only 3 records (apparently those that have the largest DesignerID number).
Here's my current SQL that lists all records by group:
SELECT tblSales.SalesAmount, tblDesigner.DesignerID,
tblDesigner.DesignerFirst, tblDesigner.DesignerLast, tblGroup.GroupName,
tblLocation.LocationName, tblSales.NumberSales, tblSales.NetLeads,
tblGroup.GroupID
FROM tblLocation INNER JOIN (tblGroup INNER JOIN (tblDesigner INNER JOIN
tblSales ON tblDesigner.DesignerID = tblSales.DesignerID) ON tblGroup.GroupID
= tblDesigner.GroupID) ON tblLocation.LocationID = tblDesigner.LocationID;
I'd like to know how to get the report to look like:
Group One
Sally $23,000
Sue $22,000
Sam $21,000
Group Two
Joe $44,000
Jay $39,500
Mary $35,780
Group Three
(list the top three of the group and so on for each group)
Thanks for any help,