Instruction
Don't give up! Here comes the next table!
Exercise
This time we'll add information about the shop's daily sales.
The SalesHistory table consists of the following three columns:
ProductId- the ID of a given product,Date- the date of sale, andAmount- the amount of a given product sold on a particular day.
For every day in the SalesHistory table show the sales of the products with ID's 13, 18, and 15.
Display the date, name, Amount, and calorific value of a product.
Order the results by date and then by calorific value.
Stuck? Here's a hint!
Type:
SELECT Date, P.Name, Amount, Calories FROM Product P JOIN SalesHistory Sh ON P.Id = Sh.ProductId JOIN NutritionData ND ON ND.ProductId = P.Id WHERE P.Id IN (13, 18, 15) ORDER BY Date, Calories



