This document provides an SQL query to display customer information for customers who have cancelled all of their orders. The query uses a sub-query to select the customer IDs from the order_header table where the order status is cancelled. It then displays the customer ID, full name, email, phone, and country from the online_customer and address tables where the customer ID matches those from the sub-query, returning information only for customers who have cancelled all orders.
This document provides an SQL query to display customer information for customers who have cancelled all of their orders. The query uses a sub-query to select the customer IDs from the order_header table where the order status is cancelled. It then displays the customer ID, full name, email, phone, and country from the online_customer and address tables where the customer ID matches those from the sub-query, returning information only for customers who have cancelled all orders.
This document provides an SQL query to display customer information for customers who have cancelled all of their orders. The query uses a sub-query to select the customer IDs from the order_header table where the order status is cancelled. It then displays the customer ID, full name, email, phone, and country from the online_customer and address tables where the customer ID matches those from the sub-query, returning information only for customers who have cancelled all orders.
Write a query to display customer_id, full name, customer_email, customer_phone
and country of customers who have cancelled all the orders placed by them (USE SUB-QUERY) [NOTE: TABLES to be used - ONLINE_CUSTOMER, ADDRESSS, ORDER_HEADER]
select * from address;
select onl.customer_id, concat(onl.customer_fname," ",onl.customer_lname) as