Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the Assign 1 database, populate the database with sufficient data to test your queries ( See Note below ) . Develop and document the
Using the Assign database, populate the database with sufficient data to test your queries See Note below Develop and document the SQL queries necessary to satisfy the following. Only show in the output the details required by the specifics of the query. No unnecessary or debug columns. The term list details means all the columns from the specified table no more and no less.
List the details for all orders for the customer named "Charlie" that contained sales for the item "Apples". Sequence the output by order no
List the order no for orders that have more than listed sale item entries in
List the customers details for customers who have placed orders items in the "Fruit" FR or "Vegetable" VG catgeory in Show each customer only once. Sequence by customer name.
List the id description and category of items where the QOH is less than the reorder level. Sequence by item id within category
List the details for the items that have been sold at a discount on any order Where the sale price less than list price Sequence by item description within category
List the details for all customers that have ordered items with characters "Bananas" anywhere in its description. Sequence by customer name.
List the description of the item with the maximum quantity on hand of any item in the "Fruit" FR category.
List the total quantity sold for the item with the description "Green Bananas" in Ontario in
List the item details for all sold items in Sequence the output by item description.
Count the number of times an item in the vegetable VG category has appeared on an order in
Count the number of different item categories represented by sales in Quebec in August
List the details for the customers that purchased the item "Broccoli" in Show each customer only once and sequence alphabetically by customer name
List for each item by item id the highest sale value sale price qty sold appearing on any order. Sequence from highest to lowest sale value
List the total value of sales sale price qty sold for each item category in Order the output by lowest value to highest.
List the customer id for the Ontario customers that have placed or more orders in
List in alphabetic sequence by item description the details of any items ordered by the customer named "Jones". Show each item only once
List the customer details for those customers who have bought broccoli in and who reside in either Ontario or Quebec. Sequence by customer no
Show by item id the total value sale price qty sold for each sale item in August where that item appeared on at least orders in that same time period
List the total inventory value item cost qty on hand for each item in the VG category
Write the following commands. I must be able to test run i ii and iii below in sequence.
a Add a new sale item to the database
b Update the qtysold by adding new units Use a formula. Don't directly hard code the new value
c Delete the sale item
Note: I must be able to test run i ii and iii above in sequence.
Note: Queries that do not return sufficient data will be marked as wrong
i All queries must generate some output
ii Queries with explicit sequencing must return a minimum of rows
iii An aggregate query must have at least one row of output that is using at least input rows eg a count of not or
iv Use column aliases where appropriate.
v Suppress duplicate rows where appropriate for output based on your actual data even if not specifically requested in the question.
Have one group member submit a Zip file not RAR thru DL that will contain the following files:
i A text file containing names and student ids for the group.
ii The mdf and log files of the database as modified with your test data.
Note: to copy or zip these database files they must be detached or offline
iii The SQL file containing your answers with the questions to the queries.
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