SELECT (SELECT sum(1) FROM xx LIMIT 1) FROM aa;
which returns 3
3
3
Personally, I think having the inner aggregation always attach to the nearest `SELECT` would have been an equally valid way of defining how this works, but it just so happens it is not defined that way.