Question: HOP 1 - SELECT statement Hands - on Practice ( HOP ) 1 - SELECT statement Write the SQL statements to satisfy the requests below:
HOP SELECT statement
Handson Practice HOP SELECT statement
Write the SQL statements to satisfy the requests below:
Create a list of authors that displays the last name followed by the first name for each author. The last names and first na should be separated by a comma and a blank space.
List all information for each order item. Include an item total, which can be calculated by multiplying the Quantity and Paideach columns. Use a column alias for the calculated value to show the heading "Item Total" in the output.
Create a list of each book title stored in the BOOKS table and the category in which each book belongs. Reverse the sequence of the columns so that the category of each book is listed first.
Create a mailing list from the CUSTOMERS table. The mailing list should display the name, address, city, state, and zip code for each customer. Each customer's name should be listed in order of last name followed by first name, separated with a comma, and have the column header "Name." The city and state should be listed as one column of output, with the values separated by a comma and the column header "Location."
To determine the percentage of profit for a particular item, subtract the item's cost from the retail price to calculate the dolla amount of profit, and then divide the profit by the item's cost. The solution is then multiplied by to determine the profit percentage for each book. Use a SELECT statement to display each book's title and percentage of profit. For the column displaying the percentage markup, use "Profit as the column heading.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
