Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Uisng SQL language write a code line for each problem. a.Create the SQL to project customer data and restrict the results based on customers having

Uisng SQL language write a code line for each problem.

a.Create the SQL to project customer data and restrict the results based on customers having balances less than $250. Also project two new columns to display your name and date the query was run. Provide a screenshot that shows the query as depicted above.

b.Create the SQL to project product data and restrict the results based on products provided by Rubicon Systems or Gomez Bros. Project the project code, description, quantity on hand, minimum quantity, price, discount and vendor name, contact and phone number. Also project two new columns to display your name and date the query was run. Provide a screenshot that shows the query as depicted above. (FYI, this will require a multi-table join).

c.Create the SQL to return products sold which have no associated vendor. Project the product, quantity on hand and minimum quantity. Also project two new columns to display your name and date the query was run. Provide a screenshot that shows the query as depicted above. (FYI, this will require a multi-table join).

d.Create the SQL to return a list of customers who have purchased more than 2 units of any product on a single transaction. Project the customer name, product purchased, number of units purchased and the date they were purchased. Also project two new columns to display your name and date the query was run. Provide a screenshot that shows the query as depicted above. (FYI, this will require a multi-table join).

e.Create the SQL to project invoiced items where the product sold was discounted by more than 5%. Project the Customer Name, Invoice Number, Line Item, Product Code, Product Price and Quantity Sold. Also project two new columns to display your name and date the query was run. Provide a screenshot that shows the query as depicted above. (FYI, this will require a multi-table join).

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

Step: 3

blur-text-image

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

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions