Save your select statements as a script. Place the semicolon at the end of each SQL statement.
Please number your select statements from 1 to 8 in your script and comment out each number. Include your name and student number as a comment at the top of your script.
The name of the script has to be Assignment1_JohnSmith. Instead of JohnSmith use your First Name and Last Name. Upload your script trough Blackboard.
Use SQL Developer to create the My Guitar Shop database, to review the tables in this database, and to enter SQL statements and run them against this database.
Use SQL Developer to create the My Guitar Shop database
Use SQL Developer to review the My Guitar Shop database
Write the following SQL Statements:
The email_address from the Customers table
A count of the number of orders
The total amount for each order (Hint: First, subtract the discount amount from the price. Then, multiply by the quantity.)
Return only those rows where the customer has more than 1 order.
Save your select statements as a script. Place the semicolon at the end of each SQL statement.
Please number your select statements from 1 to 8 in your script and comment out each number. Include your name and student number as a comment at the top of your script.
The name of the script has to be Assignment1_JohnSmith. Instead of JohnSmith use your First Name and Last Name. Upload your script trough Blackboard.
Use SQL Developer to create the My Guitar Shop database, to review the tables in this database, and to enter SQL statements and run them against this database.
Use SQL Developer to create the My Guitar Shop database
Use SQL Developer to review the My Guitar Shop database
Write the following SQL Statements:
The email_address from the Customers table
A count of the number of orders
The total amount for each order (Hint: First, subtract the discount amount from the price. Then, multiply by the quantity.)
Return only those rows where the customer has more than 1 order.
1. Write a SELECT statement that returns one row for each customer that has orders with these columns:
Answer:
SELECT email_address as Email_Address, count(orders)as No_Orders, ((price - discount_amount) * quantity) as Total_amount from Customer where orders > 1 ;
Get Answers For Free
Most questions answered within 1 hours.