Question
Use the starter script here: https://drive.google.com/file/d/1xjIkikgtkmd_NZsPFyyh25PygAon28ts/view?usp=sharing to develop a SQL script to perform functions . Display a list of customers (code and name), their invoices
Use the starter script here: https://drive.google.com/file/d/1xjIkikgtkmd_NZsPFyyh25PygAon28ts/view?usp=sharing
to develop a SQL script to perform functions . Display a list of customers (code and name), their invoices (invoice number and date). -- HINT: Use FULL OUTER JOIN but could be an inner join as well.
-- 2. Display the average number of units ordered for each product.
-- 3. Display the maximum number of units on hand for all products.
-- 4. Insert a new record into the list table to include the state of Alabama.
-- 5. Delete the new Alabama record from the list table.
-- 6. Display a list of customers with a balance between $100 and $500.
-- 7. Display a list of products that need to be reordered -- (where the quantity on hand is less than the minimum).
-- 8. Display a list of the number of vendors in each state.
-- 9. Display the total due for each line item in an invoice.
-- 10. Display the total due for each invoice (will require grouping and aggregate functions).
-- 11. Display a list of all products that come from vendors in the five state area -- (use a subquery for the WHERE clause)
-- 12. Display a list of customers sorted in order by their balance due (largest to smallest). -- Show their code, name, phone and balance.
-- 13. Create query of your own choosing that uses a function in some way -- (numeric, date/time, text, etc.)
-- 14. Create query of your own choosing. -- The query should be on something that you don't understand well in SQL.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started