Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

--- Question 4.

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


full_name,onl.customer_email, onl.customer_phone, addr.country

from online_customer onl, address addr where onl.address_id = addr.address_id

and onl.customer_id in

(select customer_id from order_header where order_status='cancelled');

You might also like