100% Guaranteed Results


DBS311 – Lab 03 – Week 4 (Sub-Queries) Solved
$ 29.99
Category:

Description

5/5 – (1 vote)

This week’s lab continues using the SELECT command and learning the interfaces for both SQL Developer and introduces the use of single-line functions.
Submission
Your submission will be a single text-based SQL file with appropriate header and commenting. Please ensure your file runs when the entire file is executed in SQL Developer.
Create a new Worksheet in SQL Developer. Save the file as L03_ID#_LASTNAME.sql
Your submission needs to be commented and include the question number and the solutions.
Using comments to number the question answers, write the SQL code to complete the following tasks.
Example Submission
— ***********************
— Name: Your Name
— ID: #########
— ***********************

— Q1 SOLUTION —
SELECT * FROM TABLE;

— Q2 Solution – SELECT * FROM TABLE;

Style Guide
Your SQL should be written using the standard coding style:
• all keywords are to be upper case,
• all user-defined names are to be lower case, (example: table and field names)
• there should be a carriage return before each major part of the SQL statements (i.e. before SELECT, FROM, WHERE and ORDER BY)
See the following sample:

SELECT columns
FROM tables
WHERE conditions
ORDER BY column1, column2;

Marking Scheme
Question Weight
1 16%
2 16%
3 17%
4 17%
5 17%
6 17%

Grade Policy
 Submissions with errors do not get any marks. o Execute your .sql file using the “Run Script” button to make sure there is no errors in your file.
 If your result in a question does not match the sample output results, you do not get any marks.
 You do not receive marks for the missing solutions.
Tasks
For each question, the title of columns and the output result must match the provided output result in that question.

2. Write a SQL query to display customer name and credit limit for customers with lowest credit limit. Sort the result by customer ID.

3. Write a SQL query to display the product ID, product name, and list price of the highest paid product(s) in each category. Sort by category ID and the product ID.

4. Write a SQL query to display the category ID and the category name of the most expensive (highest list price) product(s).

5. Write a SQL query to display product name and list price for products in category 1 which have the list price less than the lowest list price in ANY category. Sort the output by top list prices first and then by the product ID.

6. Display the maximum price (list price) of the category(s) that has the lowest price product.

Reviews

There are no reviews yet.

Be the first to review “DBS311 – Lab 03 – Week 4 (Sub-Queries) Solved”

Your email address will not be published. Required fields are marked *

Related products