The clauses in the order they are written, the join forms, the aggregate functions and the chemical operators this database adds — each with a query that runs.
Ask the same question of a chemical dataset in SQL and in Mango and compare the two answers. The database is a SQLite file your browser downloads once and queries locally, so nothing you write ever leaves your machine — which is also why the tool needs JavaScript.