Find all the customers.
select * from customers
Which customers have order status Pending? Show their names.
select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = "Pending"
Sort them in the order of customer id.
select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = "Pending" order by t2.customer_id