ค้นหาชื่อและที่อยู่ของลูกค้าที่มีทั้งคำสั่งซื้อใหม่และรอดำเนินการ ไม่จำเป็นต้องใช้ตารางทั้งหมด
Find the name and address of the customers who have both New and Pending orders.It is not neccessary to use all the tables.
 customers:  (customer_name [ VARCHAR ] customer_address [ VARCHAR ] customer_id [ VARCHAR) ]
SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "New" INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "Pending"