programming-examples/sql/FormattingOutput/Write a SQL statement to find out the number of orders booked for each day and display it in such a format like.sql
2019-11-18 14:05:53 +01:00

6 lines
272 B
SQL

/*Write a SQL statement to find out the number of orders booked for each day and display it in
such a format like "For 2001-10-10 there are 15 orders".*/
SELECT ' For',ord_date,',there are',
COUNT (DISTINCT ord_no),'orders.'
FROM orders
GROUP BY ord_date;