9 lines
481 B
MySQL
9 lines
481 B
MySQL
|
/* Write a SQL statement to make a report with customer name, city, order number, order date, and order amount in ascending
|
||
|
order according to the order date to find that either any of the existing customers have placed no order or placed one or more
|
||
|
orders.*/
|
||
|
SELECT a.cust_name,a.city, b.ord_no,
|
||
|
b.ord_date,b.purch_amt AS "Order Amount"
|
||
|
FROM customer a
|
||
|
LEFT OUTER JOIN orders b
|
||
|
ON a.customer_id=b.customer_id
|
||
|
order by b.ord_date;
|