Skip to content

Instantly share code, notes, and snippets.

@ehzawad
Created February 10, 2016 06:25
Show Gist options
  • Select an option

  • Save ehzawad/c6538c15fd9edbb02f6e to your computer and use it in GitHub Desktop.

Select an option

Save ehzawad/c6538c15fd9edbb02f6e to your computer and use it in GitHub Desktop.
1. select distinct customer.customer_name, customer.customer_city from customer, borrower where customer.customer_name = borrower.customer_name;
2. select customer_name, customer_city from customer where customer_name in(select customer_name from borrower where loan_number in(select loan_number from loan where branch_name in(select branch_name from loan where branch_name='Perryridge')));
3. select account_number, balance from account where balance between 700 and 900;
4. select customer_name, customer_street from customer where customer_street LIKE '%Hill';
5. select distinct customer_name from borrower, loan where borrower.loan_number = loan.loan_number and branch_name = 'Perryridge' and customer_name in(select customer_name from account, depositor where depositor.account_number = account.account_number);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment