Can ES do a complex aggregation with WHERE and GROUP BY + ORDER BY like in MySQL

you can.
Look at the following

And Terms Aggregation