Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create the following queries. Name of query is given in ( ) at beginning of quer

ID: 663222 • Letter: C

Question

Create the following queries. Name of query is given in ( ) at beginning of query.

(AllProducts) List all products in inventory. For each product, list number, name, location, and quantity on hand. Sort entries in order by location.

(SalesStaff) List name (last, first), job title, office and phone for all sales staff personnel. (Sales Department)

(CallInfo) For each call, list the description, product name, customer last name and employee last name.

(ProductSupport) For each product, list product number and number of customer support calls received. List ALL product numbers, even if the product did not have any support calls. (Outer Join)

(CustomerCredit) List all customers who have a balance greater than their credit limit. For each customer, list customer ID, last name, and amount over credit limit. (Use an alias for this field)

can somone help me with writing queries procedures to create tables... for SQL Server

Explanation / Answer

AllProducts

select number,name,location,quantity from products order by location ASC;

SalesStuff

select last_name,first_name,job,title,office,phone from sales_departmenet;

CallInfo

select description,product_name,cust_last_name,emp_last_name from call_info;

ProductSupport

select p.number,count(*) from products p outer join call_info c where p.number=c.product_number group by c.product_number;

CustomerCredit

select cust_id,cust_last_name,credit as amount_over_credit_limit from customer_credit;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote