SQL COMMANDS
SQL QUERIES
i.
Display the AccNo, Cust_Name, and Loan_Amount of all the loans.
ii.
Display the AccNo and Loan_Amount of all the loans started before 01-04-2009.
iii.
Display the details of all the loans with less than 40 instalments.
iv.
Display the details of all the loans whose rate of interest is NULL. `
v.
Display the details of all the loans whose rate of interest is not NULL.
vi.
Display the amounts of various loans from the table Loan_Accounts. A loan amount should appear
only once.
vii.
Display the details of all the loans started after 31-12-2008 for which the number of instalments are
more than 36.
viii.
Display the Cust_Name and Loan_Amount for all the loans which do not have number
of instalments 36.
ix.
Display the details of all the loans whose Loan_Amount is in the range 400000 to 500000.
x.
Display the Cust_Name and Loan_Amount for all the loans for which the number of instalments
are 24, 36, or 48.
xi.
Display the AccNo, Cust_Name, and Loan_Amount for all the loans for which the Cust_Name ends
with 'Sharma'.
xii.
Display the AccNo, Cust_Name, and Loan_Amount for all the loans for which the Cust_Name
does not contain 'P'.
xiii.
Display the AccNo, Cust_Name, and Loan_Amount for all the loans for which the Cust_Name
contains 'a' as the second last character.
xiv.
Display the details of all the loans in the ascending order of their Loan_Amount and within
Loan_Amount in the descending order of their Start_Date.
xv.
Display the details of all the loans which started in the year 2009.