gojets1721
Registered User.
- Local time
- Today, 07:50
- Joined
- Jun 11, 2019
- Messages
- 430
I have the a table full of customer complaints. The below query groups the data by Complaint Type and includes an average of the Product Cost.
I want to include a "1.", "2.", etc. in front of each Complaint Type. Any idea how to build that into the query?
Essentially the data looks like this right now:
And I want it to show as this in the query:
Code:
SELECT TOP 10 ComplaintType, Avg([ProductCost]) AS AvgOfCost
FROM tblComplaintData
WHERE (((ReportYear)="2023"))
GROUP BY ComplaintType
ORDER BY Avg([ProductCost]) DESC;
I want to include a "1.", "2.", etc. in front of each Complaint Type. Any idea how to build that into the query?
Essentially the data looks like this right now:
ComplaintType | AvgOfCost |
Service | $223.50 |
Timeliness | $123.41 |
And I want it to show as this in the query:
ComplaintType | AvgOfCost |
1. Service | $223.50 |
2. Timeliness | $123.41 |