Working with Aggregate Queries
Lesson 5 Directory
This Tutorial's Database: Orders.db
Orders.dbOrders.db contains a table called Orders
Orders Table Attributes:
OrderIDINTEGER PRIMARY KEYProductNameTEXT NOT NULLOrderSizeINTEGER NOT NULLCustomerIDINTEGER NULL
First 10 values within the dataset
(1, 'Oranges', 32, None)
(2, 'Pasta', 41, None)
(3, 'Broccoli', 51, None)
(4, 'Apples', 36, 8)
(5, 'Apples', 44, 17)
(6, 'Spinach', 95, 1)
(7, 'Oranges', 47, 18)
(8, 'Carrots', 13, None)
(9, 'Onions', 5, None)
(10, 'Milk', 56, None)Exercises
Determine the query for the following analysis.
Determine the total number of records within the
orderstableDetermine the number of unique products sold
Determine the number of our customer base
Determine the total number of goods sold
Determine the average amount of goods sold
Determine the single record with the most items sold
Determine the single record with the least items sold
Last updated