For the SQL Tools Assessment, you will create and submit a new .SQL script containing SQL statements that successfully generate the correct output in the designated format for the two queries described below.
Query 1
Using the UMD_PRODUCTS table, create and run a query that addresses the following:
Select PRODID, PRODNAME, STANDARDCOST, UNITPRICE, WEIGHT, MARKUP (created in step 3 below), and COSTPERWT (created in step 4 below).
Label the output of the following columns with the more descriptive names in quotes: the PRODID column "ID", the PRODNAME column "Product Name", and the STANDARDCOST column "Standard Cost".
Calculate the MARKUP column (UNITPRICE - STANDARDCOST).
Calculate the COSTPERWT column to show STANDARDCOST divided by WEIGHT, and round the result to two decimal places.
Limit to products with a STANDARDCOST greater than 100 and WEIGHT less than or equal to 1.25.
Sort the products by STANDARDCOST in descending order.
Only show the first 5 products, based on the above criteria, in the output.
Query 2
Using the ADMIN.UMD_CUSTOMERMASTER and UMD_SALESTERRITORY tables, create and run a query that addresses the following:
Select TERRITORYID, SALESVP, Number of Customers (created in step 3 below), MIN_CREDLIMIT (created in step 4 below), AVG_CREDLIMIT(created in step 5 below), MED_CREDLIMIT (created in step 6 below), and MAX_CREDLIMIT (created in step 7 below).
Join the UMD_CUSTOMERMASTER and UMD_SALESTERRITORY tables on TERRITORYID.
Calculate the Number of Customers (based on a count of CUSTNAME or CUSTID) for each Sales VP.
Calculate the minimum credit limit for each Sales VP and name it "MIN_CREDLIMIT".
Calculate the average credit limit for each Sales VP and name it "AVG_CREDLIMIT" and round it to two decimal places.
Calculate the median credit limit for each Sales VP and name it "MED_CREDLIMIT".
Calculate the maximum credit limit for each Sales VP and name it "MAX_CREDLIMIT".
Sort the output in ascending order by TERRITORYID.
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.