programming-examples/sql/View/14. Write a query to create a view that shows the number of orders in each day.sql

5 lines
194 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*14. Write a query to create a view that shows the number of orders in each day.*/
CREATE VIEW dateord(ord_date, odcount)
AS SELECT ord_date, COUNT (*)
FROM orders
GROUP BY ord_date;