Question
In SQL: 1 . Write a SELECT statement that returns one column from the Customers table named full_name that joins the last_name and first_name columns.
In SQL:
1. Write a SELECT statement that returns one column from the Customers table named full_name that joins 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 last name in ascending sequence. Return only the customers whose last name begins with letters from M to Z.
2. 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 thats greater than 500 and less than 2000.
Sort the result set in descending sequence by the date_added column.
3. 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 thats calculated from the previous two columns
discount_price A column thats calculated from the previous three columns
Use the ROWNUM pseudo column so the result set contains only the first 5 rows.
Sort the result set by discount price in descending sequence.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started