with group by: select max(1) from t1 group by c1; -> select 1 from (select c1 from t1 group by c1); without group by: select max(1) from t1; -> select max(1) from (select 1 from t1 limit 1) tmp;
with group by: select max(1) from t1 group by c1; -> select 1 from (select c1 from t1 group by c1); without group by: select max(1) from t1; -> select max(1) from (select 1 from t1 limit 1) tmp;