Professional Documents
Culture Documents
19ec103 - S.shivani Shree
19ec103 - S.shivani Shree
19ec103 - S.shivani Shree
Relation: CUSTOMER
Description: CUSTOMER
The CUSTOMER relation is described as follows:
FIELD TYPE
CUST_ID VARCHAR(10)
CUST_NAME VARCHAR(20)
ACC_NUMBER INTEGER
ACCOUNT_TYPE VARCHAR(20)
CURRENT_BALANCE INTEGER
PHONE_NUMBER VARCHAR(20)
2. Query a list of ID and Names of all the Customers whose Account Type is 'Current'.
3. Query a list of ID and Account Type of the Customers whose Current Balance is greater than 40000.
4. Write a query to deduct Rs.200 from Current Balance of all the customers.
5. Query all the fields of the Customers whose Account Type is not 'Current'.
6. Query all the fields of the Customers whose Current Balance is less than or equal to 500 and Account
Type is Current.
7. Query a list of ID and Phone Number of the customers whose Name starts with 'P'.
8. Query a list of ID and Names of Customers whose Phone_Number contains '89'.
9. Write a query to display the twice of Current Balance of all the Customers.
10. Query all the fields of the Customer whose Current Balance is 8056.
11. Query a list of customers whose name contains ‘e’ as 2nd character.
12. Query all the fields of the Customer whose Current Balance ranges from 35000 to 65000.
13. Write a query to find the Account type of the customers whose IDs are 'C101','C105' and 'C136'.
14. Query all the fields of the Customer whose Account Type is either 'Savings' or 'Current'.
15. Write a query to increment the Current Balance of all the customers with Rs.300 whose Balance is
16. Query a list of IDs of the Customer whose Name starts with 'G' and its 3rd character is 'm' and ends
with 'n'.
17. Display the ID and Account Number of the Customers Gemson, Logan and Emily in a single column.
18. Query a list of Name and Current Balance of the Customer whose Name does not end with 'n'.
19. Query all the fields of the Customer whose Account Type is not 'Savings' or 'Joint'.
20. Query all the fields of the Customer whose Name is 6 characters long, where the first two characters
are 'Sa', and the last character is 'l'.
21. Bank has increased the interest rate by 2% for all the customers who is having Joint Account. Write a
query to increase the balance of all the customers as per interest rate.
22. Write a query to Increase the Current Balance of all the Customers with Rs. 1000 whose Current
23. Query all the fields of the Customer whose Name is 'Samuel' and ID is 'C101' and Phone Number
contains '4'.
24. Query all the fields of the Customer whose Name contains 'le' and Current Balance ranges from
50000 to 70000.
25. Query all the fields of the Customer whose Name contains 'o' as second letter from last and ID’s
'C123','C103' or 'C105'.
26. Query all the fields of the Customer who have negative balance, if Rs.500 is deducted from their
account.
27. Query a list of ID, Account Type and Account Number of all the Customers whose Current balance
ranges from 35000 to 65000 and Name contains 't' as third letter.
28. Query all the fields of the Customer whose IDs are not and C101 and Current Balance is not in the
29. Query all the fields of the Customer whose Account Type is not 'Joint' and Name is 5 character long.
30. Write a query to Increment the Current Balance of all the customers with Rs.600 whose Current