Commit 023ecb31 authored by Sorrel Harriet's avatar Sorrel Harriet
Browse files

amend

parent a64ff820
......@@ -30,7 +30,8 @@ INSERT INTO Selection VALUES
SELECT drink_name, code, price FROM DrinkOption ORDER BY code;
SELECT do.drink_name, COUNT(s.id) FROM DrinkOption do
SELECT do.drink_name, COUNT(s.id) AS qty_bought FROM DrinkOption do
INNER JOIN Selection s
ON s.option_code=do.code
GROUP BY do.drink_name;
GROUP BY do.drink_name
ORDER BY do.code;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment