~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/group_min_max.result

  • Committer: Brian Aker
  • Date: 2009-07-11 08:51:36 UTC
  • mfrom: (1089.3.11 merge)
  • Revision ID: brian@gaz-20090711085136-qj01nwm3qynghwtc
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
939
939
1       SIMPLE  t2      index   NULL    idx_t2_1        651     NULL    #       Using where; Using index
940
940
select a1,a2,b,       max(c) from t1 where (c > 'b1') group by a1,a2,b;
941
941
a1      a2      b       max(c)
 
942
a       a       a       d111
 
943
a       a       b       h112
 
944
a       b       a       l121
 
945
a       b       b       p122
 
946
b       a       a       d211
 
947
b       a       b       h212
 
948
b       b       a       l221
 
949
b       b       b       p222
 
950
c       a       a       d311
 
951
c       a       b       h312
 
952
c       b       a       l321
 
953
c       b       b       p322
 
954
d       a       a       d411
 
955
d       a       b       h412
 
956
d       b       a       l421
 
957
d       b       b       p422
942
958
select a1,a2,b,       max(c) from t1 where (c > 'f123') group by a1,a2,b;
943
959
a1      a2      b       max(c)
 
960
a       a       b       h112
 
961
a       b       a       l121
 
962
a       b       b       p122
 
963
b       a       b       h212
 
964
b       b       a       l221
 
965
b       b       b       p222
 
966
c       a       b       h312
 
967
c       b       a       l321
 
968
c       b       b       p322
 
969
d       a       b       h412
 
970
d       b       a       l421
 
971
d       b       b       p422
944
972
select a1,a2,b,       max(c) from t1 where (c < 'a0') group by a1,a2,b;
945
973
a1      a2      b       max(c)
946
974
select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b;
961
989
d       b       a       j421
962
990
select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b;
963
991
a1      a2      b       min(c)  max(c)
 
992
a       a       a       a111    d111
 
993
a       a       b       e112    h112
 
994
a       b       a       i121    k121
 
995
b       a       a       a211    d211
 
996
b       a       b       e212    h212
 
997
b       b       a       i221    k221
 
998
c       a       a       a311    d311
 
999
c       a       b       e312    h312
 
1000
c       b       a       i321    j321
 
1001
d       a       a       a411    d411
 
1002
d       a       b       e412    h412
 
1003
d       b       a       i421    j421
964
1004
select a1,a2,b,       max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;
965
1005
a1      a2      b       max(c)
 
1006
a       a       a       d111
 
1007
a       a       b       h112
 
1008
a       b       a       l121
 
1009
a       b       b       p122
 
1010
b       a       a       d211
 
1011
b       a       b       h212
 
1012
b       b       a       l221
 
1013
b       b       b       p222
 
1014
c       a       a       d311
 
1015
c       a       b       h312
 
1016
c       b       a       l321
 
1017
c       b       b       p322
 
1018
d       a       a       d411
 
1019
d       a       b       h412
 
1020
d       b       a       l421
 
1021
d       b       b       p422
966
1022
select a1,a2,b,       max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
967
1023
a1      a2      b       max(c)
968
1024
a       a       a       d111
1001
1057
d       b       b       m422    p422
1002
1058
select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b;
1003
1059
a1      a2      b       min(c)  max(c)
 
1060
a       a       a       c111    d111
 
1061
a       a       b       e112    g112
 
1062
b       a       a       b211    d211
 
1063
b       a       b       e212    f212
 
1064
c       a       a       b311    d311
 
1065
c       a       b       e312    f312
 
1066
d       a       a       b411    d411
 
1067
d       a       b       e412    f412
1004
1068
select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b;
1005
1069
a1      a2      b       min(c)  max(c)
 
1070
a       a       a       a111    c111
 
1071
b       a       a       a211    c211
 
1072
c       a       a       a311    c311
 
1073
d       a       a       a411    c411
1006
1074
d       a       b       g412    g412
1007
1075
d       b       a       k421    k421
1008
1076
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;
1009
1077
a1      a2      b       min(c)  max(c)
 
1078
a       a       a       c111    d111
 
1079
a       a       b       e112    h112
 
1080
b       a       a       b211    d211
 
1081
b       a       b       e212    h212
 
1082
c       a       a       b311    d311
 
1083
c       a       b       e312    h312
 
1084
d       a       a       b411    d411
 
1085
d       a       b       e412    h412
1010
1086
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;
1011
1087
a1      a2      b       min(c)  max(c)
 
1088
a       a       a       b111    d111
 
1089
a       a       b       e112    h112
 
1090
b       a       a       b211    d211
 
1091
b       a       b       e212    h212
 
1092
c       a       a       b311    d311
 
1093
c       a       b       e312    h312
 
1094
d       a       a       b411    d411
 
1095
d       a       b       e412    h412
1012
1096
select a1,a2,b,       max(c) from t2 where (c > 'b1') group by a1,a2,b;
1013
1097
a1      a2      b       max(c)
1014
1098
a       a       a       d111
1281
1365
d       b       b       m422    p422
1282
1366
select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9'))  and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;
1283
1367
a1      a2      b       min(c)
 
1368
b       b       a       k221
 
1369
c       b       a       k321
 
1370
d       b       a       k421
1284
1371
select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9'))  and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;
1285
1372
a1      a2      b       min(c)
 
1373
b       b       a       k221
 
1374
c       b       a       k321
 
1375
d       b       a       k421
1286
1376
select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
1287
1377
a1      a2      b       min(c)
1288
1378
select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b;
1319
1409
d       b       a       i421    l421
1320
1410
select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9'))  and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;
1321
1411
a1      a2      b       min(c)
 
1412
b       b       a       k221
 
1413
c       b       a       k321
 
1414
d       b       a       k421
1322
1415
select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9'))  and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;
1323
1416
a1      a2      b       min(c)
 
1417
b       b       a       k221
 
1418
c       b       a       k321
 
1419
d       b       a       k421
1324
1420
select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
1325
1421
a1      a2      b       min(c)
1326
1422
explain select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;