Exercise 3 Views and SQL
Exercise 3 Views and SQL
Practice Questions
1. Assume you have a database with a table named "orders" that contains information
about customer orders, including order id, customer id, product id, order date, and
order status. You want to create a view that only shows orders placed in the last 30
days. Write a SQL query to create this view.
Write a view that displays the total sales revenue for each product category.