Please write queries based on the following requirements usi
Please write queries based on the following requirements using Premier Database.
5. List the following information for each transaction: item codes, the full name and mailing address of the member who placed the transaction.
database:https://onedrive.live.com/redir?resid=A1E5259BDD065B48!4478&authkey=!AH3fj0xU0Jv_Jyc&ithint=file%2caccdb
Solution
You need to to inner join between three tables transactions, transaction_details and members to get the query. It\'s given below:
select tr.transactionId,td.itemcode,mr.first & \" \"& mr.last,mr.address&\" \"&mr.city&\" \"&mr.state&\" \"&mr.zipcode from (transactions tr inner join transaction_details td on tr.transactionId=td.transactionId )inner join members mr on tr.memberId=mr.memberId where tr.transactionId in (select transactionId from transactions );
