i have tried below code, but getting syntax error.
SELECT customers_firstname, customers_lastname,o.Number
INNER JOIN (Select customer_id, count(*) as Number from orders Group by customer_id order by Number desc limit 5)AS o
on customers.customers_id = o.customer_id ;
#1064 - you have an error in your sql syntax (line number 5)