Advertisement
IhorD

Untitled

Jan 23rd, 2024
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. In the queries, you must use the constructions listed below at least once. If a given construction is not used, 2 points will be deducted for each unused construction (each individual construction = 2 points):
  2.  
  3. ● Correlated Subquery
  4. ● Operations on result set
  5. ● JOIN Statement
  6. ● ANY/ALL Statement
  7. ● EXISTS Statement
  8.  
  9. 1. Without using ORDER BY and FETCH, find the three most recent orders. Sort them by date.
  10. 2. Display the amount of time that has passed since each order was placed until today. Name the column "Time".
  11. 3. For each item, calculate the total amount paid for it across all orders. Take into account the quantity of items in each order.
  12. 4. Display order data in the format: Order date, status name, customer's last name. Sort the data in descending order by date and in ascending order by the customer's last name.
  13. 5. List the number of orders for each item. Display the name and availability of each item. Exclude items that were ordered in less than two orders.
  14. 6. Find the item that has been ordered the most times without using FETCH and ROWNUM.
  15. 7. Find the item that has never been ordered.
  16. 8. List the names of items that have an average price lower than the average price of the item with ID 4.
  17. 9. List unique orders that include both the 'Jacket' item and an item starting with the letter 'T'.
  18. 10. Provide the earliest order among orders with the same status without using FETCH and ROWNUM
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement