External Exam Download Resources Web Applications Games Recycle Bin

Sum, Average

aggregates1_1.sql

SELECT AVG(price)
FROM menu

aggregates1_2.sql

SELECT AVG(price)
FROM menu
WHERE category = 'burger'

aggregates1_3.sql

SELECT SUM(calories)
FROM menu
WHERE description LIKE '%lettuce%'
  1. show the AVG calories of all salad category items
  2. show the SUM price of all entree category items