Last active
February 3, 2016 07:06
-
-
Save abrarShariar/c425615f2a5ca862dfbf to your computer and use it in GitHub Desktop.
SQL commands (sub query)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>select customer_street from customer where customer_name in (select customer_name from borrower where loan_number in (select loan_number from loan where amount=(select max(amount) from loan))); | |
>> select amount from loan where amount>(select amount from loan where loan_number='L-15'); | |
>> 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='Downtown'))); | |
>> select customer_name,customer_city from customer where customer_name in (select customer_name from borrower); | |
>> select customer_name from borrower where loan_number in (select loan_number from loan where branch_name = (select branch_name from loan where loan_number=(select loan_number from borrower where customer_name='Adams'))); | |
>> select customer_name from borrower where loan_number in (select loan_number from loan where branch_name='Perryridge'); | |
>> select customer_name,loan_number from borrower where loan_number in (select loan_number from loan where amount=(select max(amount) from loan)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment