List customers so that the ones referred by someone come first (by referred_by ascending), then the ones with no referrer, each part sorted by customer_id. Show customer_id, name and referred_by.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.