Practical-4 (SQL) : Group By, Having Clause, Join and Nested Queries 1

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

U.V.Patel College of Engineering B. Tech. Sem.

III (CE/IT)
Ganpat University Database Management System

PRACTICAL-4 (SQL)

NOTE: for following queries use TABLES of PRACTICAL-1

GROUP BY, HAVING CLAUSE, JOIN AND NESTED QUERIES

1. Display the sum of balance of account holders who’s live in same city ‘Mehsana’ using group
by clause.
2. Display the information about account where balance is less than total balance of all
account holders.

3. Displays the information of account holders whose loan amount and balance both are same.

4. Display the name of city, remaining loan amount, account, date of loan and loan number of
account holders.

5. Display name of account holder, installment number and installment amount Whose loan
number is ‘L001’.

6. Display name of account holder, city, loan amount and installment amount.

7. Display the balance of account holders whose balance and remaining loan both are same.

8. List of all account holders’ information whose balance is same as loan amount.

9. Display the amount of transaction, name of account holders, account number and mode of
payment whose mode of payment is ‘CHEQUE’.

10. List of installment information whose amount is less than average amount of transaction.

11. Display the sum of installment amount and transaction amount.

12. Display loan amount, transaction amount and mode of payment where transaction date and
loan taken date both are done in month of ‘MAY’.

13. Display the last three row of account table.

14. Retrieve only rows 2 to 5 from account table.

You might also like