Show me the names of all customers who have at least two orders.
select t2.customer_name from orders as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t2.customer_id having count(*) >= 2
Now show me names of customers who have at most two orders.
select t2.customer_name from orders as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t2.customer_id having count(*) <= 2