Professional Documents
Culture Documents
SQL1 in Class Exercise
SQL1 in Class Exercise
SQL1 in Class Exercise
Question 1
3
Question 5 and Question 6
5) Consider the table in Question 1. What is the result for the following
SQL query?
SELECT customer-id
FROM CUST
WHERE customer-street LIKE ‘N%’ OR customer-city LIKE ‘H_%’
Write the SQL query to find the names of owners of accounts with
balances at least 30k.
4
Question 7 and Question 8
7. Consider the tables in Question 6. Find the acc-ids of all
accounts except the one with the largest balance.
HINT: You can rename the table with the name NAME to N in
the FROM clause by using the following SQL query.
SELECT *
FROM NAME N