QuestionQuestion

See the attachment “Jeweler.accdb” and answer the following questions with SQL queries.
Please copy SQL from Access and paste the queries into a TXT document.
Please use my initials (BTL) as an Alias in each query.
1. What items made by Mary Josephson were purchased?
2. What is the sum of all purchases made by Elizabeth Stanley (customerID = 1)
3. What is the average cost of all Earrings?
4. What items were purchased on 5/16/2012 and by which customer?
5. What is the highest purchase made by a single customer?
6. What is the most expensive item sold in the jewelry shop?
BONUS:
In a single SQL query answer the following question:
• How many items are cost more than the average item price?
• Due to a new tax, you must pay 5% of each invoice as a tax. What is the amount of money that you must give away?

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

/* Answer 1 */
SELECT distinct ITEM.Description as BTL
FROM ITEM INNER JOIN ((CUSTOMER INNER JOIN PURCHASE ON CUSTOMER.CustomerID = PURCHASE.CustomerID) INNER JOIN PURCHASE_ITEM ON PURCHASE.InvoiceNumber = PURCHASE_ITEM.InvoiceNumber) ON ITEM.ItemNumber = PURCHASE_ITEM.ItemNumber
WHERE (((CUSTOMER.[lastname])="Josephson") AND ((CUSTOMER.FirstName)="Mary"));

/* Answer 2 */
SELECT Sum(PURCHASE.PreTaxAmount) AS BTL
FROM CUSTOMER INNER JOIN PURCHASE ON CUSTOMER.CustomerID = PURCHASE.CustomerID
HAVING (((CUSTOMER.CustomerID)=1));...
$35.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Database Development Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats