Elasticsearch is not a SQL database, so you cannot just use SQL queries (though there are efforts to build a layer, that accepts SQL plugins - though that doesn't mean that will ever be possible inside Kibana).
In Elasticsearch you work a lot with aggregation to aggregate (GROUP BY) your data together, and with filters and queries to filter it (WHERE).
What you are looking into is most likely, doing a terms aggregation on the customer_id (or whatever it's called) field. That way you would get the count of documents for each customer_id. If you have a field in there with the actual amount that was ordered, instead of using the count aggregation as a metrics aggregation, you could switch to a sum aggregation on that field. Now the value wouldn't be the amount of documents, but the actual sum of all orders in those documents.