fix: the amount here is actually the revenue sum
This commit is contained in:
parent
9455039fd6
commit
10d1f6e831
@ -148,9 +148,7 @@ WHERE Products.color = 'red'
|
|||||||
AND Sales.date = '2024-02-14';
|
AND Sales.date = '2024-02-14';
|
||||||
|
|
||||||
-- Question 1 part 2 c)
|
-- Question 1 part 2 c)
|
||||||
-- One sID can have multiple products
|
SELECT SUM(Sales.amount)
|
||||||
-- We need the DISTINCT keyword
|
|
||||||
SELECT COUNT(DISTINCT sID)
|
|
||||||
FROM Sales
|
FROM Sales
|
||||||
WHERE Sales.date = '2024-02-14';
|
WHERE Sales.date = '2024-02-14';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user