Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write a query based on the following requirements using Premier Database.

ID: 3811156 • Letter: P

Question

Please write a query based on the following requirements using Premier Database. The Mediafire link below is where the Premier Database can be found. For the question, you are required to submit 1) SQL query code and 2) a screen shot of your query results (if your results contains more than 15 records, you can submit a screen shot of the top 15 records).

http://www.mediafire.com/file/pbl5u3ah7aj4fc2/Premier%282%29.accdb

15. List the state from which female members have placed more than 20 transactions. Show those state abbreviate and number of transactions. Rank your results from the highest to the lowest on total number of transactions.

Explanation / Answer

SQL Query:

select tr.Location, trd.Quantity from TRANSACTIONS tr, TRANSACTION_DETAILS trd, MEMBERS m

where m.Gender='F' and m.MemberID=tr.MEMBERID and tr.TransactionID=trd.TransactionID and trd.Quantity>20 ORDER BY trd.Quantity DESC