Created
July 19, 2023 08:10
-
-
Save inabahare/f540efb72fe986f8110ad7c6b3b4c082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
cars.style, | |
SUM(cars.cost_$) AS Revenue, | |
YEAR(sales.purchase_date) AS Purchase_Year | |
FROM sales | |
INNER JOIN cars ON sales.car_id = cars.car_id | |
WHERE cars.style = 'SUV' AND YEAR(sales.purchase_date) = '2022'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment