Solved Create a query to find number of items in a table

Sepp1945

Member
Local time
Today, 19:35
Joined
Feb 12, 2023
Messages
33
I have a table (see below) which has field "Product_ID", ( numbers 1 to 7).
I would like to create a query to give me in seven field the count of each product.
I tried but failed.
Thank you
Sepp
1676467111842.png
 
Why 7 fields? Try a crosstab query.
 
Thank you
 
you can join the product table (if you have) and do as advised in post#2.
this one does not have a product table:

TRANSFORM Count(tblPayments.Product_ID) AS CountOfProduct_ID
SELECT "Total Count" AS Remarks
FROM tblPayments
GROUP BY "Total Count"
PIVOT tblPayments.Product_ID In (1,2,3,4,5,6,7);
 

Users who are viewing this thread

Back
Top Bottom