0% found this document useful (0 votes)
217 views9 pages

Saving Account Details Overview

This document contains SQL queries to: A) List customer IDs, names, and account types for saving accounts; B) List names and addresses of account holders with loan amounts over $50,000; C) Update the name of the customer with account number 3 to "ABC"; D) List account numbers with deposits over $80,000; E) Count the number of fixed deposit accounts; F) List customers who opened accounts between January and August 2008; G) List transactions from August 28, 2008; H) Delete the customer name associated with loan account number 3.

Uploaded by

Prajot Raikar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
217 views9 pages

Saving Account Details Overview

This document contains SQL queries to: A) List customer IDs, names, and account types for saving accounts; B) List names and addresses of account holders with loan amounts over $50,000; C) Update the name of the customer with account number 3 to "ABC"; D) List account numbers with deposits over $80,000; E) Count the number of fixed deposit accounts; F) List customers who opened accounts between January and August 2008; G) List transactions from August 28, 2008; H) Delete the customer name associated with loan account number 3.

Uploaded by

Prajot Raikar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
  • List Saving Accounts
  • List Loan Holder Details
  • Update Customer Name
  • List Major Deposits
  • Count Fixed Deposit Accounts
  • Account Creation Date Range Query
  • Transaction Details for Specific Date
  • Delete Customer from Loans

A] List the detail of account who have saving account. SELECT c_id,c_name,acc_type FROM acc,customer WHERE c_id=acc_no.

B] List the name and address of account holder who has loan amount more than 50,000. SELECT c_name,adds,l_amt FROM customer, loan Where l_amt=50,000.

C] Change the name of the customer asABC whose account number is 3. UPDATE customer SET c_name=ABC WHERE acc_no=3.

D] List the account no with total deposit is more than 80,000. SELECT acc_no,deposit FROM account,transaction WHERE deposite=80,000.

E] List the number of fixed deposit account in the bank. SELECT * FROM account WHERE acc_type=fixed.

F] Display the details of customer who created their accounts between 20-Jan-08 to 20Aug-08. SELECT * FROM transaction WHERE dot BET (20-1-08 and20-8-08).

G] Display the details transaction on 28th aug 2008. SELECT * FROM transaction WHERE dot=28-8-2008.

H] Delete the name of customer who having loan account no is 3. DELETE FROM loan WHERE acc_no =3.

A] List the detail of account who have saving account.
SELECT c_id,c_name,acc_type
FROM  acc,customer
WHERE c_id=acc_no.
B] List the name and address of account holder who has loan amount more than 50,000.
SELECT c_name,adds,l_amt
FROM customer,
C] Change the name of the customer as”ABC” whose account number is 3.
UPDATE  customer
SET c_name=”ABC”
WHERE acc_no=3.
D] List the account no with total deposit is more than 80,000.
SELECT acc_no,deposit
FROM account,transaction
WHERE deposite=
E] List the number of fixed deposit account in the bank.
SELECT *
FROM  account 
WHERE acc_type=”fixed”.
F]  Display the details of customer who created their accounts between ’20-Jan-08’ to ’20-
Aug-08’.
SELECT *
FROM transaction
G] Display the details transaction on 28th aug 2008.
SELECT *
FROM transaction
WHERE dot=’28-8-2008’.
H] Delete the name of customer who having loan account no is 3.
DELETE  FROM loan
WHERE acc_no =3.

You might also like