You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UPDATE Products
SET
Price =20.99WHERE
Product ='New Product'
Verify using the SELECT again
2.3
Delete
DELETEFROM
Products
WHERE
Product ='New Product'
Verify using the SELECT again
Exercise 3 - Joins
3.1
SELECT
Buyer,
Products.Product,
Price
FROM
Products
INNER JOIN Purchases
ONProducts.Product=Purchases.ProductWHERE
Seller ='Fred'ORDER BY
Buyer
3.3
SELECTProducts.Product,
Buyer
FROM
Products
LEFT OUTER JOIN Purchases
ONProducts.Product=Purchases.Product
3.4
SELECTProducts.Product,
Price
FROM
Products
LEFT OUTER JOIN Purchases
ONProducts.Product=Purchases.ProductWHERE
Buyer IS NULL
Exercise 4 - Aggregates
4.1
SELECT
Seller,
SUM(Price) AS GrossSales
FROM
Products
INNER JOIN Purchases
ONProducts.Product=Purchases.ProductGROUP BY
Seller
4.2
SELECT
Seller,
SUM(Price) AS GrossSales
FROM
Products
INNER JOIN Purchases
ONProducts.Product=Purchases.ProductGROUP BY
Seller
HAVING
GrossSales >200
4.3
SELECT
Seller,
COUNT(*) AS NumberOfSales,
AVG(Price) AS AverageSalePrice
FROM
Products
INNER JOIN Purchases
ONProducts.Product=Purchases.ProductGROUP BY
Seller