Generate and test two SQL queries for each of the following tasks:
a) the SQL statement needed to perform the stated task with the traditional approach(using the WHERE clause),
b) the SQL statement needed to perform the stated task with the JOIN keyword.
Apply table aliases in all queries.
5. Determine the profit of each book sold to Jake Lucas, using the actual price the customer paid (not the book's regular retail price). Sort the
results by order date. If more than one book was ordered, sort the results by profit amount in descending order. You need to use four tables:
customers, orders, orderitems, and books (15 points). Because of the complexity of this question, one correct SQL statement can get the full
points. If you provide the second correct statement, I will give you 5 extra points.
7. What gift will a customer who orders the book Shortest Poems receive? Use the actual book retail value to determine the gift. You need to use
two tables: books and promotion (15 points).
In addition to the SQL statements, please submit a snapshot of the result you got when you run each of the SQL statements.