221
221
select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having count_col1 = 10;
222
222
select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having col2 = 'hello';
223
223
select col1 as count_col1,col2 as group_col2 from t1 as tmp1 group by col1,col2 having group_col2 = 'hello';
225
225
select sum(col1) as co12 from t1 group by col2 having col2 10;
226
226
select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 =10;
228
228
select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10;