This is much simpler than you think:
select distinct(customer_id) from orders;
Edit: if you really want to get complete customer information,
select * from customers where customer_id in (select distinct(customer_id) from orders);
Michael kopinsky
source share