📄 group_min_max.result
字号:
id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-byexplain select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-byexplain select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-byexplain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t3 range NULL idx_t3_1 6 NULL 4 Using where; Using index for group-byexplain select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t3 range NULL idx_t3_1 6 NULL 4 Using where; Using index for group-byselect a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;a1 a2 b max(c) min(c)a a b h112 e112b a b h212 e212c a b h312 e312d a b h412 e412select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;a1 max(c) min(c)a h112 e112b h212 e212c h312 e312d h412 e412select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2;a1 a2 b max(c)a a b h112a b b p122b a b h212b b b p222c a b h312c b b p322d a b h412d b b p422select a1,a2,b,min(c),max(c) from t1 where (b = 'b') group by a1,a2;a1 a2 b min(c) max(c)a a b e112 h112a b b m122 p122b a b e212 h212b b b m222 p222c a b e312 h312c b b m322 p322d a b e412 h412d b b m422 p422select a1,a2, max(c) from t1 where (b = 'b') group by a1,a2;a1 a2 max(c)a a h112a b p122b a h212b b p222c a h312c b p322d a h412d b p422select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;a1 a2 b max(c) min(c)a a b h112 e112b a b h212 e212c a b h312 e312d a b h412 e412e a b NULL NULLselect a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;a1 max(c) min(c)a h112 e112b h212 e212c h312 e312d h412 e412e NULL NULLselect a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2;a1 a2 b max(c)a a b h112a b b p122b a b h212b b b p222c a b h312c b b p322d a b h412d b b p422e a b NULLselect a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2;a1 a2 b min(c) max(c)a a b e112 h112a b b m122 p122b a b e212 h212b b b m222 p222c a b e312 h312c b b m322 p322d a b e412 h412d b b m422 p422e a b NULL NULLselect a1,a2, max(c) from t2 where (b = 'b') group by a1,a2;a1 a2 max(c)a a h112a b p122b a h212b b p222c a h312c b p322d a h412d b p422e a NULLselect a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;a1 a2 b max(c) min(c)a a b h112 e112b a b h212 e212c a b h312 e312select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;a1 max(c) min(c)a h112 e112b h212 e212c h312 e312explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-byexplain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL 5 Using where; Using index for group-byexplain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-byexplain select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-byselect a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;a1 a2 b min(c)a a NULL a777c a NULL c777select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;a1 a2 b max(c)a a NULL a999c a NULL c999select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;a1 a2 b min(c)a a NULL a777c a NULL c777select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2;a1 a2 b max(c)a a NULL a999c a NULL c999select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;a1 a2 b min(c) max(c)a a NULL a777 a999c a NULL c777 c999select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;a1 a2 b min(c) max(c)a a NULL a777 a999c a NULL c777 c999explain select a1,a2,b, max(c) from t1 where (c > 'b1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b, max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t1 where (c between 'b111' and 'g112') or (c between 'd000' and 'i110') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-byexplain select a1,a2,b, max(c) from t2 where (c > 'b1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b, max(c) from t2 where (c > 'f123') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (c > 'f123') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b, max(c) from t2 where (c < 'a0') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (c < 'a0') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b, max(c) from t2 where (c < 'k321') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (c < 'k321') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b, max(c) from t2 where (c < 'a0') or (c > 'b1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (c < 'a0') or (c > 'b1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b, max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (c > 'b111') and (c <= 'g112') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byexplain select a1,a2,b,min(c),max(c) from t2 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b;id select_type table type possible_keys key key_len ref rows Extra1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-byselect a1,a2,b, max(c) from t1 where (c > 'b1') group by a1,a2,b;a1 a2 b max(c)a a a d111a a b h112a b a l121a b b p122b a a d211b a b h212b b a l221b b b p222c a a d311c a b h312c b a l321c b b p322d a a d411d a b h412d b a l421d b b p422select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b;a1 a2 b min(c) max(c)a a a b111 d111a a b e112 h112a b a i121 l121a b b m122 p122b a a b211 d211b a b e212 h212b b a i221 l221b b b m222 p222c a a b311 d311c a b e312 h312c b a i321 l321c b b m322 p322d a a b411 d411d a b e412 h412d b a i421 l421d b b m422 p422select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b;a1 a2 b max(c)a a b h112a b a l121a b b p122b a b h212b b a l221b b b p222c a b h312c b a l321c b b p322d a b h412d b a l421d b b p422select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b;a1 a2 b min(c) max(c)a a b g112 h112a b a i121 l121a b b m122 p122b a b f212 h212b b a i221 l221b b b m222 p222c a b f312 h312c b a i321 l321c b b m322 p322d a b f412 h412d b a i421 l421d b b m422 p422select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b;a1 a2 b max(c)select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b;a1 a2 b min(c) max(c)select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b;a1 a2 b max(c)a a a d111a a b h112a b a k121b a a d211b a b h212b b a k221c a a d311c a b h312c b a j321d a a d411d a b h412d b a j421select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b;a1 a2 b min(c) max(c)a a a a111 d111a a b e112 h112a b a i121 k121b a a a211 d211b a b e212 h212b b a i221 k221c a a a311 d311c a b e312 h312c b a i321 j321
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -