Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write SQL queries for the following 1. Write a query to count the number of invoices 2. Write a query to count the number

Please write SQL queries for the following

1. Write a query to count the number of invoices

2. Write a query to count the number of customers with a balance of more than $750

3. Generate a listing of all purchases made by the customers. Sort the results by customer code and invoice number.

4. Write a query to display the customer code, balance, and total purchases for each customer. Total purchase is calculated by summing the line subtotals for each customer. Create a query to produce the total purchase per invoice and sort by Invoice Number. Invoice total is the sum of the product purchases in the LINE that corresponds to the INVOICE.

5. List the balances of customers who have made purchases during the current invoice cycle-i.e. for the customers who appear in the INVOICE table. Sort by Customer Code (CUS_CODE).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+3. What impediments deal with customers?

Answered: 1 week ago