Assignment 5
Assignment 5
QUERY 1: List all combinations of customers, their associated bank, and account details.
QUERY 2: Find the customers with ‘Active’ savings accounts from specific banks.
NATURAL JOIN :
QUERY 1: List customers and bank details of those who have ‘Dormant’ accounts.
QUERY 2: Display the customer with bank ID, name, and location if they have more than one account in the
same bank.
CONDITIONAL JOIN :
QUERY 1: List all accounts with customer and bank information for accounts created after a specific date.
QUERY 2: Display customers and their banks where the bank location is different from the customer's city.
EQUI JOIN :
QUERY 1: Get the customer’s name and account status for account/s in a specific bank.
QUERY 2: List customers whose accounts are either ‘Current’ or ‘Fixed’ deposits, and their associated banks.
SELF JOIN :
QUERY 1: Find customers who have more than one account in different cities within the same bank.
QUERY 2: Compare the account opening dates of two accounts from the same customer in the same bank.
INNER JOIN :
QUERY 1: Find the customer and bank details of the account that is ‘Closed’.
QUERY 2: List customers with different investment types and loan types in a particular branch of HDFC Bank.
QUERY 1: Get all the details of the active customers and their bank names.
QUERY 2: List banks along with the total number of customers, even if zero customers exist.
QUERY 1: Find all accounts and customers for banks that have at least one customer.
QUERY 2: Find customers who have accounts in multiple banks but no ‘Active’ account in any.
Find customers who have accounts, but the bank they belong to is ‘Suspended’.