linfo2172-databases/P3/queries/query2.sql

9 lines
227 B
MySQL
Raw Normal View History

2024-04-24 11:31:15 +02:00
-- Author: Anatole Huet
2024-04-24 10:38:32 +02:00
-- Determine the total number of purchases for each product. List the number of the product, as well as the total number of purchases.
2024-04-24 11:31:15 +02:00
SELECT product, Count(*) as cnt
2024-04-24 10:38:32 +02:00
FROM Purchases
GROUP BY product
;