sql server query: how to select customers with more than 1 order
select customerid
, count(*) as order_count
from orders
group by
customerid
having count(*) > 1
select customerid
, count(*) as order_count
from orders
group by
customerid
having count(*) > 1