Between & some operator
1) Find the loan number of those loans with loan amounts between 900 and 1500 ?
SQL Query: select loan_number from loan where amount between 900 and 1500.
2) Find the loan number, branch name , amount of those loans with loan amounts between 1300 and 2000 ?
SQL Query: select loan_number, branch_name, amount from loan where amount between 1300 and 2000.
Or
select * from loan where amount between 1300 and 2000.
3) Select all loan number & amount that ar branch name is "Downtown", "Redwood", "Round hill"?
SQL Query: select loan_number, amount from loan where IN ( ' Downtown ', ' Round hill ', ' Redwood ' )
4) Select all loan number & amount that ar branch name is NOT "Downtown", "Redwood", "Round hill"?
SQL Query: select loan_number, amount from loan where NOT IN ( ' Downtown ', ' Round hill ', ' Redwood ' )
5) Show amount from loan but amount attribute is addition by 10;
SQL Query: Select amount + 10 from loan
6) Show amount from loan but amount attribute is subtraction by 10;
SQL Query: Select amount - 10 from loan
7) Show amount from loan but amount attribute is multiplied by 10;
SQL Query: Select amount * 10 from loan
8) Show amount from loan but amount attribute is division by 10;
SQL Query: Select amount / 10 from loan
9) Show amount from loan table, where loan number is "L-23" & amount multiplied by 5
SQL Query: Select amount * 5 from loan where loan_number = ' L-23 '
10) Show all information from loan table, where loan number is "L-15" & amount multiplied by 10
SQL Query: Select loan_number, branch_name, amount * 10 from loan where loan_number = ' L-15 '
<-- Back Page
<-- Back Page
0 Comments
If you have any doubts, Please let me know