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

AcctID Acct_Name Address Phone_No Acct_Type Deposit

a-1234 Karl Malone Texas 02-123-1244 Savings 1000


b-1234 Michael Jordan California 00-122-9876 Checking 10000
c-2345 Scotie Pippen New York 23-265-1389 Payroll 2000
d-4567 John Stockton Los Angeles 09-187-9817 Savings 0
e-4321 Steve Kerr Dallas 19-238-0989 Payroll 0
f-8976 Kobe Bryant Illinoi 11-198-0987 Payroll 0
g-8765 Tony Cuchoc New York 12-908-1765 Checking 8000
h-0099 Willie Miller Seatle 99-098-1234 Savings 100000
i-1122 Jayson Kid California 88-876-9155 Payroll 50000
j-0988 Junemar Fajardo Philippines 91-187-1467 Payroll 0
k-8096 Luis Tenorio Philippines 11-982-5647 Checking 0
l-0077 Greg Slaughter Philippines 33-178-9837 Checking 0
m-2299 Justin Brownlee California 88-890-3636 Payroll 100
n-0190 Robert Jaworski Germany 02-1235-8765 Savings 50
o-7209 Dudut Jaworski Germany 02-1234-0987 Payroll 0

f
Withdrawal Transfer Payment Balance
0 500 1000 0
0 0 1000 0
0 0 1000 0
0 0 1000 0
0 0 1000 0
0 0 1000 0
0 700 1000 0
0 9000 1000 0
0 800 1000 0
0 0 1000 0
0 0 1000 0
0 0 1000 0
0 60 1000 0
0 10 1000 0
0 0 1000 0
Use SQL statements to execute each requirement below:
Submit the file and Write your query statement across each number.

1. Create a database named BANK.


2. Create the table named tblBank.
3. Enter the data as its records.
4. Use AcctID as the primary key.
5. List all the records. How many records are generated?
6. List all records with Account Type of Payroll. How many records are there?
7. Update the Balance of Michael Jordan to 20,000.
8. Update all Balance of Payroll Account by adding 15,000.
9. List the Account name and Balance of all Payroll account.
10. List the Account name and Balance of all Payroll account in ascending order by Account name.
11. Update Payment of Account name Kobe Bryant by deducting 500 from his current payment..
12. List Balance and Payment of Kobe Bryant.
13. Compute the sum of Deposit, Withdrawal, Transfer, and Payment. Name it as Total Transaction.
14. Display the Deposit, Withdrawal, Transfer, and Payment of all records.
15. Update Deposit of all Saving Account by adding 1000.
16. List all the Account Name and Deposit of all Savings account.
17. Delete all records whose Address is Philippines.
18. How many records were deleted?
19. Add another record following the given data: 'z-0989', 'Karem Abdul Jabar', 'Israel', '12-890-9999', 'Investment', 1000,1000,1000,1000
20. List all Investment accounts.
21. List all Checking account whose account address is California.
22. List all account id, account name, and address of those who live in New York in ascending order by account name.
23. List the highest balance of all records.
24. Count all the records.
25. Compute the sum of Deposit.
26. Compute the sum of Balance.
27. Compute the average Balance.
28. Delete all records whose Transfer value is zero.
29. List all records with Transfer value not equal to zero.
30. Update Balance by subtracting Withdrawal from Balance.
31. List all records.
32. Add 2 more records of your own.
33. List all records the you have added.
34. Count all records. How many records?
35. List all Covid 19 account name. How many records?

You might also like