Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Database Management Systems Lecture: D. C.

Wickramasekara
August 30, 2014

SQL Practical 03

Note: Use given “supermarket.sql” file to restore supermarket database and answer following
questions.

Write SQL queries for below given scenarios and execute on a database server.

1. Choose all customers whose age range is between 18 and 23.


2. Sort all customers according to their name and descending order.
3. Choose all customers whose age is 18 or 20.
4. Choose all customers whose age is 20 and name is Kamal.
5. Count total customers.
6. Choose minimum age person’s name from customer table.
7. Choose maximum age person’s name from customer table.
8. Calculate total amount on invoice table.
9. Calculate average amount on invoice table.
10. Choose how many sales happen on 2013-01-15.
11. Choose employee name where invoice ID equals to 3 on invoice table.

1|Page

You might also like