Create Table Loan (Lid Number (3), Amount Number (10,2), Emi Number (10,2), Branch Varchar2 (10) )
This document contains a series of SQL queries on a loan table:
1) It defines a loan table with fields for loan ID, amount, monthly installment (EMI), and branch.
2) The queries find details like the number of records, loans over $50k, loans from branches starting with "V", minimum/maximum loan amounts, total/average EMIs, and more.
3) It displays specific rows like the first, last, or first three rows in different orders.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
78 views
Create Table Loan (Lid Number (3), Amount Number (10,2), Emi Number (10,2), Branch Varchar2 (10) )
This document contains a series of SQL queries on a loan table:
1) It defines a loan table with fields for loan ID, amount, monthly installment (EMI), and branch.
2) The queries find details like the number of records, loans over $50k, loans from branches starting with "V", minimum/maximum loan amounts, total/average EMIs, and more.
3) It displays specific rows like the first, last, or first three rows in different orders.
3. Find the number of loans whose amount>50000 4. Find the number of loans whose branch name starts with v 5. Find the smallest loan amount 6. 7. 8. 9.
Find Find Find Find
the the the the
largest loan amount
sum of all emis average of all emis average of all emis from vizag branch
10. Find the average of emis for all branches
11. Find the branches and avg emis whose average emis>2500 12. Find the average of emis for all the branches whose name conatins the letter u 13. Display the first row of the loan table 14. Display the first three rows of the loan table 15. Display the first three rows of the loan table in the order of lids 16. Find the last row number of the table loan 17. Display all the rows except the last row from the table loan 18. Display the last row of the table loan