Professional Documents
Culture Documents
University of Technology Sydney SQL TEST 1 - Practice Test Questions 2023
University of Technology Sydney SQL TEST 1 - Practice Test Questions 2023
1. List pizzas with the substring 'i' anywhere within the pizza name.
select pizza
from menu
where pizza like '%i%';
2. Give the average price of pizzas from each country of origin. Change the
csolumn name related to average price to "average".
select country,
avg(price) as average
from menu
group by country
3. Give the average price of pizzas from each country of origin, do not list
countries with only one pizza.
from menu
group by country
4. List all ingredients and their types for the 'margarita' pizza. Do not use a
subquery.
from items
(SELECT MAX(PRICE)
FROM MENU
WHERE COUNTRY='italy');
SQL EXAM 2
1. List all pizzas, giving pizza name, price and country of origin where the country
of origin has NOT been recorded (i.e. is missing).
select pizza, price, country
from menu
where country is null