E
Eric Brenner
I do not know how to get the Top 3 items by group and I can't seem to
find anywhere the breaks down an example well. Anyway, I want to take
this Access 97 query:
SELECT CaseAttribute.ProductLineCode, Attribute.Name,
Sum(CaseAttribute.Deductions) AS SumOfDeductions
FROM Attribute INNER JOIN (CaseAttribute INNER JOIN Audit ON
CaseAttribute.AuditID = Audit.ID) ON (Attribute.ProductLineCode =
CaseAttribute.ProductLineCode) AND (Attribute.ID =
CaseAttribute.AttributeID)
WHERE (((Audit.AuditDate) Between #1/1/2012# And #12/31/2012#))
GROUP BY CaseAttribute.ProductLineCode, Attribute.Name
ORDER BY CaseAttribute.ProductLineCode, Sum(CaseAttribute.Deductions)
DESC;
....and get the Top 3 items by CaseAttribute.ProductLineCode then by
Attribute.Name. I've searched many sites but I can't seem to get the
concept down. Anyone care to help?
Thanks.
find anywhere the breaks down an example well. Anyway, I want to take
this Access 97 query:
SELECT CaseAttribute.ProductLineCode, Attribute.Name,
Sum(CaseAttribute.Deductions) AS SumOfDeductions
FROM Attribute INNER JOIN (CaseAttribute INNER JOIN Audit ON
CaseAttribute.AuditID = Audit.ID) ON (Attribute.ProductLineCode =
CaseAttribute.ProductLineCode) AND (Attribute.ID =
CaseAttribute.AttributeID)
WHERE (((Audit.AuditDate) Between #1/1/2012# And #12/31/2012#))
GROUP BY CaseAttribute.ProductLineCode, Attribute.Name
ORDER BY CaseAttribute.ProductLineCode, Sum(CaseAttribute.Deductions)
DESC;
....and get the Top 3 items by CaseAttribute.ProductLineCode then by
Attribute.Name. I've searched many sites but I can't seem to get the
concept down. Anyone care to help?
Thanks.