How to Retrieve Data From a Single Table - IT Assignment Help

Download Solution Order New Solution
Assignment Task

 

In these exercises, you’ll enter and run your own SELECT statements.

1. Write a SELECT statement that returns four columns from the Products table: product_code, product_name, list_price, and discount_percent. Add an ORDER BY clause to this statement that sorts the result set by list price in descending sequence.

2. Write a SELECT statement that returns three columns from the Customers table named firstname, last_name and full_name that combines the last_name and first_name columns. Format this column with the last name, a comma, a space, and the first name like this: Doe, John Sort the result set by the last_name column in ascending sequence. Return only the customers whose last name begins with letters from M to Z. NOTE: When comparing strings of characters, ‘M’ comes before any string of characters that begins with ‘M’. For example, ‘M’ comes before ‘Murach’.

3. Write a SELECT statement that returns these columns from the Products table: product_name The product_name column list_price The list_price column date_added The date_added column Return only the rows with a list price that’s greater than 500 and less than 2000. Sort the result set by the date_added column in descending sequence.

4. Write a SELECT statement that returns these column names and data from the Products table: product_name The product_name column list_price The list_price column discount_percent The discount_percent column discount_amount A column that’s calculated from the previous two columns discount_price A column that’s calculated from the previous three columnsRound the discount_amount and discount_price columns to 2 decimal places. Sort the result set by the discount_price column in descending sequence. Use the LIMIT clause so the result set contains only the first 5 rows.

5. Write a SELECT statement that returns these column names and data from the Order_Items table: item_id item_price The item_price column discount_amount The discount_amount column quantity The quantity column price_total A column that’s calculated by multiplying the item price by the quantity discount_total A column that’s calculated by multiplying the discount amount by the quantity item_total A column that’s calculated by subtracting the discount amount from the item price and then multiplying by the quantity Only return rows where the item_total is greater than 500. Sort the result set by the item_total column in descending sequence. Work with nulls and test expressions

6. Write a SELECT statement that returns these columns from the Orders table: order_id The order_id column order_date The order_date column ship_date The ship_date column Return only the rows where the ship_date column contains a null value. Sort the result set by the order_id column in descending sequence.

7. Write a SELECT statement without a FROM clause that creates a row with these columns: price 100 (dollars) tax_rate .07 (7 percent) tax_amount The price multiplied by the tax

8. Write a SELECT statement that joins the Categories table to the Products table and returns these columns: category_name, product_name, list_price. Sort the result set by the category_name column and then by the product_name column in ascending sequence.

9. Write a SELECT statement that joins the Customers table to the Addresses table and returns these columns: first_name, last_name, line1, city, state, zip_code. Return one row for each address for the customer with an email address of allan.sherwood@yahoo.com Sort the result set by the zip_code column in ascending sequence. .

10. Write a SELECT statement that joins the Customers table to the Addresses table and returns these columns: first_name, last_name, line1, city, state, zip_code. Return one row for each customer, but only return addresses that are the shipping address for a customer.

 

 

This IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.