~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/pool_of_threads.result

  • Committer: Monty Taylor
  • Date: 2008-07-22 05:48:51 UTC
  • mto: (202.1.3 toru)
  • mto: This revision was merged to the branch mainline in revision 204.
  • Revision ID: monty@inaugust.com-20080722054851-airxt73370725p7x
Re-enabled optimizations for the normal build, and added back the --with-debug option to turn them off. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
drop table if exists t1,t2,t3,t4;
2
 
CREATE TABLE t1 (
3
 
Period int DEFAULT '0000' NOT NULL,
4
 
Varor_period int DEFAULT '0' NOT NULL
5
 
) ENGINE=myisam;
6
 
INSERT INTO t1 VALUES (9410,9412);
7
 
select period from t1;
8
 
period
9
 
9410
10
 
select * from t1;
11
 
Period  Varor_period
12
 
9410    9412
13
 
select t1.* from t1;
14
 
Period  Varor_period
15
 
9410    9412
16
 
CREATE TABLE t2 (
17
 
auto int not null auto_increment,
18
 
fld1 int DEFAULT '000000' NOT NULL,
19
 
companynr int DEFAULT '00' NOT NULL,
20
 
fld3 char(30) DEFAULT '' NOT NULL,
21
 
fld4 char(35) DEFAULT '' NOT NULL,
22
 
fld5 char(35) DEFAULT '' NOT NULL,
23
 
fld6 char(4) DEFAULT '' NOT NULL,
24
 
UNIQUE fld1 (fld1),
25
 
KEY fld3 (fld3),
26
 
PRIMARY KEY (auto)
27
 
) ENGINE=myisam;
28
 
select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
29
 
fld3
30
 
imaginable
31
 
select fld3 from t2 where fld3 like "%cultivation" ;
32
 
fld3
33
 
cultivation
34
 
select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3;
35
 
fld3    companynr
36
 
concoct 58
37
 
druggists       58
38
 
engrossing      58
39
 
Eurydice        58
40
 
exclaimers      58
41
 
ferociousness   58
42
 
hopelessness    58
43
 
Huey    58
44
 
imaginable      58
45
 
judges  58
46
 
merging 58
47
 
ostrich 58
48
 
peering 58
49
 
Phelps  58
50
 
presumes        58
51
 
Ruth    58
52
 
sentences       58
53
 
Shylock 58
54
 
straggled       58
55
 
synergy 58
56
 
thanking        58
57
 
tying   58
58
 
unlocks 58
59
 
select fld3,companynr from t2 where companynr = 58 order by fld3;
60
 
fld3    companynr
61
 
concoct 58
62
 
druggists       58
63
 
engrossing      58
64
 
Eurydice        58
65
 
exclaimers      58
66
 
ferociousness   58
67
 
hopelessness    58
68
 
Huey    58
69
 
imaginable      58
70
 
judges  58
71
 
merging 58
72
 
ostrich 58
73
 
peering 58
74
 
Phelps  58
75
 
presumes        58
76
 
Ruth    58
77
 
sentences       58
78
 
Shylock 58
79
 
straggled       58
80
 
synergy 58
81
 
thanking        58
82
 
tying   58
83
 
unlocks 58
84
 
select fld3 from t2 order by fld3 desc limit 10;
85
 
fld3
86
 
youthfulness
87
 
yelped
88
 
Wotan
89
 
workers
90
 
Witt
91
 
witchcraft
92
 
Winsett
93
 
Willy
94
 
willed
95
 
wildcats
96
 
select fld3 from t2 order by fld3 desc limit 5;
97
 
fld3
98
 
youthfulness
99
 
yelped
100
 
Wotan
101
 
workers
102
 
Witt
103
 
select fld3 from t2 order by fld3 desc limit 5,5;
104
 
fld3
105
 
witchcraft
106
 
Winsett
107
 
Willy
108
 
willed
109
 
wildcats
110
 
select t2.fld3 from t2 where fld3 = 'honeysuckle';
111
 
fld3
112
 
honeysuckle
113
 
select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
114
 
fld3
115
 
honeysuckle
116
 
select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
117
 
fld3
118
 
honeysuckle
119
 
select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%';
120
 
fld3
121
 
honeysuckle
122
 
select t2.fld3 from t2 where fld3 LIKE 'h%le';
123
 
fld3
124
 
honeysuckle
125
 
select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_';
126
 
fld3
127
 
select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
128
 
fld3
129
 
explain select t2.fld3 from t2 where fld3 = 'honeysuckle';
130
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
131
 
1       SIMPLE  t2      ref     fld3    fld3    122     const   1       Using where; Using index
132
 
explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle';
133
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
134
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where
135
 
explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle';
136
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
137
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where
138
 
explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle';
139
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
140
 
1       SIMPLE  t2      ref     fld3    fld3    122     const   1       Using where; Using index
141
 
explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle';
142
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
143
 
1       SIMPLE  t2      ref     fld3    fld3    122     const   1       Using where; Using index
144
 
explain select fld3 from t2 ignore index (fld3,not_used);
145
 
ERROR 42000: Key 'not_used' doesn't exist in table 't2'
146
 
explain select fld3 from t2 use index (not_used);
147
 
ERROR 42000: Key 'not_used' doesn't exist in table 't2'
148
 
select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
149
 
fld3
150
 
honeysuckle
151
 
honoring
152
 
explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
153
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
154
 
1       SIMPLE  t2      range   fld3    fld3    122     NULL    2       Using where; Using index
155
 
select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3;
156
 
fld1    fld3
157
 
148504  Colombo
158
 
68305   Colombo
159
 
0       nondecreasing
160
 
select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes';
161
 
fld1    fld3
162
 
232605  appendixes
163
 
1232605 appendixes
164
 
1232606 appendixes
165
 
1232607 appendixes
166
 
1232608 appendixes
167
 
1232609 appendixes
168
 
select fld1 from t2 where fld1=250501 or fld1="250502";
169
 
fld1
170
 
250501
171
 
250502
172
 
explain select fld1 from t2 where fld1=250501 or fld1="250502";
173
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
174
 
1       SIMPLE  t2      range   fld1    fld1    4       NULL    2       Using where; Using index
175
 
select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
176
 
fld1
177
 
250501
178
 
250502
179
 
250505
180
 
250601
181
 
explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502;
182
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
183
 
1       SIMPLE  t2      range   fld1    fld1    4       NULL    4       Using where; Using index
184
 
select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%';
185
 
fld1    fld3
186
 
11402   Romans
187
 
11403   intercepted
188
 
11703   sumac
189
 
12001   flanking
190
 
12004   subjective
191
 
12005   scatterbrain
192
 
12303   Kane
193
 
12304   overlay
194
 
12305   perturb
195
 
12306   goblins
196
 
12602   Wotan
197
 
12603   snatching
198
 
12605   laterally
199
 
12606   yelped
200
 
12701   grazing
201
 
12704   misunderstander
202
 
13601   handgun
203
 
13602   foldout
204
 
13603   mystic
205
 
13604   succumbed
206
 
13605   Nabisco
207
 
13606   fingerings
208
 
13801   intelligibility
209
 
13803   teethe
210
 
13901   scholastics
211
 
16201   wallet
212
 
16202   parters
213
 
16302   quitter
214
 
16303   neat
215
 
16304   Steinberg
216
 
18001   jarring
217
 
18002   tinily
218
 
18004   persist
219
 
18007   fanatic
220
 
18008   measures
221
 
18009   rightfulness
222
 
18012   impulsive
223
 
18013   starlet
224
 
18014   terminators
225
 
18015   untying
226
 
18017   featherweight
227
 
18018   pessimist
228
 
18021   lawgiver
229
 
18022   stated
230
 
18023   readable
231
 
18026   motors
232
 
18027   interrogate
233
 
18028   pests
234
 
18029   stairway
235
 
18032   testicle
236
 
18033   Parsifal
237
 
18034   leavings
238
 
18035   postulation
239
 
18036   squeaking
240
 
18038   leftover
241
 
18039   whiteners
242
 
18041   Punjab
243
 
18042   Merritt
244
 
18043   Quixotism
245
 
18044   sweetish
246
 
18046   scornfully
247
 
18051   sureties
248
 
18052   puddings
249
 
18054   fetters
250
 
18056   incurring
251
 
18058   pithed
252
 
18060   Miles
253
 
18061   trimmings
254
 
18101   tragedies
255
 
18102   skulking
256
 
18103   flint
257
 
18104   flopping
258
 
18201   relaxing
259
 
18202   offload
260
 
18402   suites
261
 
18403   lists
262
 
18405   multilayer
263
 
18406   standardizes
264
 
18409   Judas
265
 
18601   vacuuming
266
 
18603   humanness
267
 
18801   inch
268
 
18802   Weissmuller
269
 
18803   irresponsibly
270
 
18804   luckily
271
 
18806   medical
272
 
18808   subschema
273
 
18810   Micronesia
274
 
18811   repetitions
275
 
19101   ventilate
276
 
19102   pityingly
277
 
19103   interdependent
278
 
19201   Graves
279
 
30501   neonatal
280
 
30504   honoring
281
 
31901   realtor
282
 
36002   funereal
283
 
36005   sorters
284
 
38002   lectured
285
 
38004   Hawaii
286
 
38006   hushes
287
 
38007   Simla
288
 
38008   reporters
289
 
38011   groupings
290
 
38015   Taoism
291
 
38017   fetched
292
 
38101   rusting
293
 
38102   galling
294
 
38103   obliterates
295
 
38104   traitor
296
 
38201   resumes
297
 
38203   terminator
298
 
38204   gritty
299
 
38205   firearm
300
 
38206   minima
301
 
38208   Selfridge
302
 
42802   witchcraft
303
 
48001   Manhattanize
304
 
48002   imprint
305
 
48003   peeked
306
 
48004   swelling
307
 
48005   interrelationships
308
 
48006   riser
309
 
48007   Gandhian
310
 
48008   peacock
311
 
48102   kanji
312
 
48202   scarf
313
 
48204   insolence
314
 
48205   syndicate
315
 
48302   imperial
316
 
48304   railway
317
 
48305   validate
318
 
48401   normalizes
319
 
48405   schemer
320
 
48407   Kline
321
 
48409   partridges
322
 
48411   recruited
323
 
48602   praised
324
 
48604   linear
325
 
48801   quagmire
326
 
50901   western
327
 
51201   relishing
328
 
56002   serving
329
 
56003   scheduling
330
 
56004   lore
331
 
58004   Fenton
332
 
58101   husky
333
 
58102   impelling
334
 
58103   undoes
335
 
58111   squeezes
336
 
58113   rudeness
337
 
58118   mushrooms
338
 
58121   pellagra
339
 
58124   Huffman
340
 
58125   Majorca
341
 
58126   governing
342
 
58127   gadfly
343
 
58128   reassigned
344
 
58201   intentness
345
 
58303   psychic
346
 
58304   squabbled
347
 
58607   subdirectory
348
 
88302   Gothicism
349
 
88303   feminine
350
 
88305   metaphysically
351
 
88402   sanding
352
 
98025   Miltonism
353
 
186002  freakish
354
 
186102  index
355
 
186302  straight
356
 
188007  flurried
357
 
188011  gentleman
358
 
188012  gifted
359
 
188013  Shanghais
360
 
188014  sportswriting
361
 
188015  sloping
362
 
188016  navies
363
 
188017  leaflet
364
 
188102  shooter
365
 
188103  Joplin
366
 
188503  swaying
367
 
188504  Goldstine
368
 
188505  fitting
369
 
190701  Norwalk
370
 
196101  sating
371
 
196103  icon
372
 
196104  throttles
373
 
196203  priceless
374
 
198001  publicly
375
 
198003  incidentals
376
 
198005  mumbles
377
 
198006  furthermore
378
 
198008  parametrized
379
 
198009  registration
380
 
198010  sadly
381
 
198011  positioning
382
 
198014  hoarder
383
 
198017  rains
384
 
198018  workers
385
 
198019  sags
386
 
198020  unplug
387
 
198021  garage
388
 
198024  specifics
389
 
198101  Teresa
390
 
198103  Winsett
391
 
198204  resplendent
392
 
198401  sews
393
 
198402  participated
394
 
198403  Simon
395
 
202301  Fitzpatrick
396
 
202303  misted
397
 
202304  textures
398
 
202305  save
399
 
202602  rightful
400
 
202606  Lizzy
401
 
202904  Hornblower
402
 
202907  vests
403
 
202908  indulgences
404
 
203101  infallibly
405
 
203103  unwilling
406
 
203105  spools
407
 
203402  overestimating
408
 
203404  ineffective
409
 
203901  humiliation
410
 
203902  sophomore
411
 
203903  star
412
 
203906  rifles
413
 
203909  indulge
414
 
206201  languages
415
 
206203  percentage
416
 
206207  specification
417
 
206208  regimented
418
 
208002  pictures
419
 
208003  serpents
420
 
208008  realized
421
 
208009  mayoral
422
 
208010  opaquely
423
 
208011  hostess
424
 
208101  fiftieth
425
 
208102  incorrectly
426
 
208104  stranglings
427
 
208105  mixture
428
 
208111  similarities
429
 
208113  freest
430
 
208201  Greenberg
431
 
208203  tinting
432
 
208302  warm
433
 
208305  smoothed
434
 
208402  Romano
435
 
208501  securing
436
 
208505  heiress
437
 
210101  inform
438
 
210103  universals
439
 
210104  Kinsey
440
 
210105  ravines
441
 
213201  relatively
442
 
213203  pressure
443
 
213206  rightfully
444
 
213207  mechanizing
445
 
216101  Latinizes
446
 
216103  timesharing
447
 
218003  males
448
 
218004  shapelessly
449
 
218006  mastering
450
 
218007  Newtonian
451
 
218008  finishers
452
 
218010  teem
453
 
218011  kiting
454
 
218020  stodgy
455
 
218022  feed
456
 
218023  guitars
457
 
218101  store
458
 
218103  Pyle
459
 
218201  Saxony
460
 
218202  serializations
461
 
218203  Peruvian
462
 
218204  taxonomically
463
 
218205  kingdom
464
 
218301  stint
465
 
218302  Sault
466
 
218401  faithful
467
 
218402  Ganymede
468
 
218403  tidiness
469
 
218404  gainful
470
 
218408  Tipperary
471
 
218409  tropics
472
 
218410  theorizers
473
 
226001  renew
474
 
226003  terminal
475
 
226004  Hegelian
476
 
226005  hypothesizer
477
 
226006  warningly
478
 
226007  journalizing
479
 
226008  nested
480
 
226203  Lars
481
 
226204  saplings
482
 
226205  foothill
483
 
226206  labeled
484
 
226207  imperiously
485
 
226208  reporters
486
 
226209  furnishings
487
 
226210  precipitable
488
 
228004  Stalin
489
 
228006  ripeness
490
 
228008  unruly
491
 
228009  mournfulness
492
 
228108  slaughter
493
 
228109  Sabine
494
 
228110  handy
495
 
228111  rural
496
 
228112  organizer
497
 
228113  shipyard
498
 
228115  inaccuracy
499
 
228116  rules
500
 
228117  juveniles
501
 
228119  investigations
502
 
228120  stabilizes
503
 
228121  seminaries
504
 
228122  Hunter
505
 
228201  sporty
506
 
228206  test
507
 
228207  weasels
508
 
228209  tempering
509
 
228211  Galatean
510
 
228212  techniques
511
 
228214  veranda
512
 
228301  severely
513
 
228306  forthcoming
514
 
228307  guides
515
 
228308  vanish
516
 
228309  lied
517
 
228310  sawtooth
518
 
228311  fated
519
 
228312  gradually
520
 
228313  widens
521
 
228314  preclude
522
 
230302  percentage
523
 
18062   humility
524
 
230501  gleaning
525
 
230502  petted
526
 
230504  minion
527
 
230505  marginal
528
 
230507  measures
529
 
230508  precaution
530
 
230509  repelled
531
 
230901  primary
532
 
230904  navigate
533
 
230905  spatial
534
 
230906  Gurkha
535
 
230907  meanwhile
536
 
230908  Melinda
537
 
230911  previewing
538
 
230912  glut
539
 
230913  unaffected
540
 
230914  inmate
541
 
231304  mineral
542
 
231305  impending
543
 
231306  meditation
544
 
231307  ideas
545
 
231308  miniaturizes
546
 
231309  lewdly
547
 
231310  title
548
 
231311  youthfulness
549
 
231315  freezes
550
 
232102  forgivably
551
 
232103  reduce
552
 
232104  McGovern
553
 
232105  Nazis
554
 
232107  socializes
555
 
232601  Kevin
556
 
232602  uncovering
557
 
232606  raining
558
 
232607  infest
559
 
232609  minting
560
 
236105  roped
561
 
236106  waltz
562
 
236107  Lillian
563
 
236108  repressions
564
 
236110  noncritical
565
 
236111  lithograph
566
 
236112  spongers
567
 
236113  parenthood
568
 
238005  posed
569
 
238006  instruments
570
 
238007  filial
571
 
238008  fixedly
572
 
238009  relives
573
 
238010  Pandora
574
 
238011  watering
575
 
238012  ungrateful
576
 
238013  secures
577
 
228123  poison
578
 
218206  presentation
579
 
150401  Kantian
580
 
select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
581
 
fld3
582
 
select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
583
 
fld3
584
 
Chantilly
585
 
select fld1,fld3 from t2 where fld1 like "25050%";
586
 
fld1    fld3
587
 
250501  poisoning
588
 
250502  Iraqis
589
 
250503  heaving
590
 
250504  population
591
 
250505  bomb
592
 
select fld1,fld3 from t2 where fld1 like "25050_";
593
 
fld1    fld3
594
 
250501  poisoning
595
 
250502  Iraqis
596
 
250503  heaving
597
 
250504  population
598
 
250505  bomb
599
 
select distinct companynr from t2;
600
 
companynr
601
 
0
602
 
37
603
 
36
604
 
50
605
 
58
606
 
29
607
 
40
608
 
53
609
 
65
610
 
41
611
 
34
612
 
68
613
 
select distinct companynr from t2 order by companynr;
614
 
companynr
615
 
0
616
 
29
617
 
34
618
 
36
619
 
37
620
 
40
621
 
41
622
 
50
623
 
53
624
 
58
625
 
65
626
 
68
627
 
select distinct companynr from t2 order by companynr desc;
628
 
companynr
629
 
68
630
 
65
631
 
58
632
 
53
633
 
50
634
 
41
635
 
40
636
 
37
637
 
36
638
 
34
639
 
29
640
 
0
641
 
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
642
 
fld3    period
643
 
obliterates     9410
644
 
offload 9410
645
 
opaquely        9410
646
 
organizer       9410
647
 
overestimating  9410
648
 
overlay 9410
649
 
Pandora 9410
650
 
parametrized    9410
651
 
parenthood      9410
652
 
Parsifal        9410
653
 
parters 9410
654
 
participated    9410
655
 
partridges      9410
656
 
peacock 9410
657
 
peeked  9410
658
 
pellagra        9410
659
 
percentage      9410
660
 
persist 9410
661
 
perturb 9410
662
 
Peruvian        9410
663
 
pessimist       9410
664
 
pests   9410
665
 
petted  9410
666
 
pictures        9410
667
 
pithed  9410
668
 
pityingly       9410
669
 
poison  9410
670
 
posed   9410
671
 
positioning     9410
672
 
postulation     9410
673
 
praised 9410
674
 
precaution      9410
675
 
precipitable    9410
676
 
preclude        9410
677
 
presentation    9410
678
 
pressure        9410
679
 
previewing      9410
680
 
priceless       9410
681
 
primary 9410
682
 
psychic 9410
683
 
publicly        9410
684
 
puddings        9410
685
 
Punjab  9410
686
 
Pyle    9410
687
 
quagmire        9410
688
 
quitter 9410
689
 
Quixotism       9410
690
 
railway 9410
691
 
raining 9410
692
 
rains   9410
693
 
ravines 9410
694
 
readable        9410
695
 
realized        9410
696
 
realtor 9410
697
 
reassigned      9410
698
 
recruited       9410
699
 
reduce  9410
700
 
regimented      9410
701
 
registration    9410
702
 
relatively      9410
703
 
relaxing        9410
704
 
relishing       9410
705
 
relives 9410
706
 
renew   9410
707
 
repelled        9410
708
 
repetitions     9410
709
 
reporters       9410
710
 
repressions     9410
711
 
resplendent     9410
712
 
resumes 9410
713
 
rifles  9410
714
 
rightful        9410
715
 
rightfully      9410
716
 
rightfulness    9410
717
 
ripeness        9410
718
 
riser   9410
719
 
Romano  9410
720
 
Romans  9410
721
 
roped   9410
722
 
rudeness        9410
723
 
rules   9410
724
 
rural   9410
725
 
rusting 9410
726
 
Sabine  9410
727
 
sadly   9410
728
 
sags    9410
729
 
sanding 9410
730
 
saplings        9410
731
 
sating  9410
732
 
Sault   9410
733
 
save    9410
734
 
sawtooth        9410
735
 
Saxony  9410
736
 
scarf   9410
737
 
scatterbrain    9410
738
 
scheduling      9410
739
 
schemer 9410
740
 
scholastics     9410
741
 
scornfully      9410
742
 
secures 9410
743
 
securing        9410
744
 
Selfridge       9410
745
 
seminaries      9410
746
 
serializations  9410
747
 
serpents        9410
748
 
serving 9410
749
 
severely        9410
750
 
sews    9410
751
 
Shanghais       9410
752
 
shapelessly     9410
753
 
shipyard        9410
754
 
shooter 9410
755
 
similarities    9410
756
 
Simla   9410
757
 
Simon   9410
758
 
skulking        9410
759
 
slaughter       9410
760
 
sloping 9410
761
 
smoothed        9410
762
 
snatching       9410
763
 
socializes      9410
764
 
sophomore       9410
765
 
sorters 9410
766
 
spatial 9410
767
 
specification   9410
768
 
specifics       9410
769
 
spongers        9410
770
 
spools  9410
771
 
sportswriting   9410
772
 
sporty  9410
773
 
squabbled       9410
774
 
squeaking       9410
775
 
squeezes        9410
776
 
stabilizes      9410
777
 
stairway        9410
778
 
Stalin  9410
779
 
standardizes    9410
780
 
star    9410
781
 
starlet 9410
782
 
stated  9410
783
 
Steinberg       9410
784
 
stint   9410
785
 
stodgy  9410
786
 
store   9410
787
 
straight        9410
788
 
stranglings     9410
789
 
subdirectory    9410
790
 
subjective      9410
791
 
subschema       9410
792
 
succumbed       9410
793
 
suites  9410
794
 
sumac   9410
795
 
sureties        9410
796
 
swaying 9410
797
 
sweetish        9410
798
 
swelling        9410
799
 
syndicate       9410
800
 
Taoism  9410
801
 
taxonomically   9410
802
 
techniques      9410
803
 
teem    9410
804
 
teethe  9410
805
 
tempering       9410
806
 
Teresa  9410
807
 
terminal        9410
808
 
terminator      9410
809
 
terminators     9410
810
 
test    9410
811
 
testicle        9410
812
 
textures        9410
813
 
theorizers      9410
814
 
throttles       9410
815
 
tidiness        9410
816
 
timesharing     9410
817
 
tinily  9410
818
 
tinting 9410
819
 
Tipperary       9410
820
 
title   9410
821
 
tragedies       9410
822
 
traitor 9410
823
 
trimmings       9410
824
 
tropics 9410
825
 
unaffected      9410
826
 
uncovering      9410
827
 
undoes  9410
828
 
ungrateful      9410
829
 
universals      9410
830
 
unplug  9410
831
 
unruly  9410
832
 
untying 9410
833
 
unwilling       9410
834
 
vacuuming       9410
835
 
validate        9410
836
 
vanish  9410
837
 
ventilate       9410
838
 
veranda 9410
839
 
vests   9410
840
 
wallet  9410
841
 
waltz   9410
842
 
warm    9410
843
 
warningly       9410
844
 
watering        9410
845
 
weasels 9410
846
 
Weissmuller     9410
847
 
western 9410
848
 
whiteners       9410
849
 
widens  9410
850
 
Winsett 9410
851
 
witchcraft      9410
852
 
workers 9410
853
 
Wotan   9410
854
 
yelped  9410
855
 
youthfulness    9410
856
 
select distinct fld3 from t2 where companynr = 34 order by fld3;
857
 
fld3
858
 
absentee
859
 
accessed
860
 
ahead
861
 
alphabetic
862
 
Asiaticizations
863
 
attitude
864
 
aye
865
 
bankruptcies
866
 
belays
867
 
Blythe
868
 
bomb
869
 
boulevard
870
 
bulldozes
871
 
cannot
872
 
caressing
873
 
charcoal
874
 
checksumming
875
 
chess
876
 
clubroom
877
 
colorful
878
 
cosy
879
 
creator
880
 
crying
881
 
Darius
882
 
diffusing
883
 
duality
884
 
Eiffel
885
 
Epiphany
886
 
Ernestine
887
 
explorers
888
 
exterminated
889
 
famine
890
 
forked
891
 
Gershwins
892
 
heaving
893
 
Hodges
894
 
Iraqis
895
 
Italianization
896
 
Lagos
897
 
landslide
898
 
libretto
899
 
Majorca
900
 
mastering
901
 
narrowed
902
 
occurred
903
 
offerers
904
 
Palestine
905
 
Peruvianizes
906
 
pharmaceutic
907
 
poisoning
908
 
population
909
 
Pygmalion
910
 
rats
911
 
realest
912
 
recording
913
 
regimented
914
 
retransmitting
915
 
reviver
916
 
rouses
917
 
scars
918
 
sicker
919
 
sleepwalk
920
 
stopped
921
 
sugars
922
 
translatable
923
 
uncles
924
 
unexpected
925
 
uprisings
926
 
versatility
927
 
vest
928
 
select distinct fld3 from t2 limit 10;
929
 
fld3
930
 
abates
931
 
abiding
932
 
Abraham
933
 
abrogating
934
 
absentee
935
 
abut
936
 
accessed
937
 
accruing
938
 
accumulating
939
 
accuracies
940
 
select distinct fld3 from t2 having fld3 like "A%" limit 10;
941
 
fld3
942
 
abates
943
 
abiding
944
 
Abraham
945
 
abrogating
946
 
absentee
947
 
abut
948
 
accessed
949
 
accruing
950
 
accumulating
951
 
accuracies
952
 
select distinct substring(fld3,1,3) from t2 where fld3 like "A%";
953
 
substring(fld3,1,3)
954
 
aba
955
 
abi
956
 
Abr
957
 
abs
958
 
abu
959
 
acc
960
 
acq
961
 
acu
962
 
Ade
963
 
adj
964
 
Adl
965
 
adm
966
 
Ado
967
 
ads
968
 
adv
969
 
aer
970
 
aff
971
 
afi
972
 
afl
973
 
afo
974
 
agi
975
 
ahe
976
 
aim
977
 
air
978
 
Ald
979
 
alg
980
 
ali
981
 
all
982
 
alp
983
 
alr
984
 
ama
985
 
ame
986
 
amm
987
 
ana
988
 
and
989
 
ane
990
 
Ang
991
 
ani
992
 
Ann
993
 
Ant
994
 
api
995
 
app
996
 
aqu
997
 
Ara
998
 
arc
999
 
Arm
1000
 
arr
1001
 
Art
1002
 
Asi
1003
 
ask
1004
 
asp
1005
 
ass
1006
 
ast
1007
 
att
1008
 
aud
1009
 
Aug
1010
 
aut
1011
 
ave
1012
 
avo
1013
 
awe
1014
 
aye
1015
 
Azt
1016
 
select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10;
1017
 
a
1018
 
aba
1019
 
abi
1020
 
Abr
1021
 
abs
1022
 
abu
1023
 
acc
1024
 
acq
1025
 
acu
1026
 
Ade
1027
 
adj
1028
 
select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10;
1029
 
substring(fld3,1,3)
1030
 
aba
1031
 
abi
1032
 
Abr
1033
 
abs
1034
 
abu
1035
 
acc
1036
 
acq
1037
 
acu
1038
 
Ade
1039
 
adj
1040
 
select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
1041
 
a
1042
 
aba
1043
 
abi
1044
 
Abr
1045
 
abs
1046
 
abu
1047
 
acc
1048
 
acq
1049
 
acu
1050
 
Ade
1051
 
adj
1052
 
create table t3 (
1053
 
period    int not null,
1054
 
name      char(32) not null,
1055
 
companynr int not null,
1056
 
price     double(11,0),
1057
 
price2     double(11,0),
1058
 
key (period),
1059
 
key (name)
1060
 
) engine=myisam;
1061
 
create temporary table tmp engine = myisam select * from t3;
1062
 
insert into t3 select * from tmp;
1063
 
insert into tmp select * from t3;
1064
 
insert into t3 select * from tmp;
1065
 
insert into tmp select * from t3;
1066
 
insert into t3 select * from tmp;
1067
 
insert into tmp select * from t3;
1068
 
insert into t3 select * from tmp;
1069
 
insert into tmp select * from t3;
1070
 
insert into t3 select * from tmp;
1071
 
insert into tmp select * from t3;
1072
 
insert into t3 select * from tmp;
1073
 
insert into tmp select * from t3;
1074
 
insert into t3 select * from tmp;
1075
 
insert into tmp select * from t3;
1076
 
insert into t3 select * from tmp;
1077
 
insert into tmp select * from t3;
1078
 
insert into t3 select * from tmp;
1079
 
alter table t3 add t2nr int not null auto_increment primary key first;
1080
 
drop table tmp;
1081
 
SET SQL_BIG_TABLES=1;
1082
 
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
1083
 
namn
1084
 
Abraham Abraham
1085
 
abrogating abrogating
1086
 
admonishing admonishing
1087
 
Adolph Adolph
1088
 
afield afield
1089
 
aging aging
1090
 
ammonium ammonium
1091
 
analyzable analyzable
1092
 
animals animals
1093
 
animized animized
1094
 
SET SQL_BIG_TABLES=0;
1095
 
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
1096
 
concat(fld3," ",fld3)
1097
 
Abraham Abraham
1098
 
abrogating abrogating
1099
 
admonishing admonishing
1100
 
Adolph Adolph
1101
 
afield afield
1102
 
aging aging
1103
 
ammonium ammonium
1104
 
analyzable analyzable
1105
 
animals animals
1106
 
animized animized
1107
 
select distinct fld5 from t2 limit 10;
1108
 
fld5
1109
 
neat
1110
 
Steinberg
1111
 
jarring
1112
 
tinily
1113
 
balled
1114
 
persist
1115
 
attainments
1116
 
fanatic
1117
 
measures
1118
 
rightfulness
1119
 
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
1120
 
fld3    count(*)
1121
 
affixed 1
1122
 
and     1
1123
 
annoyers        1
1124
 
Anthony 1
1125
 
assayed 1
1126
 
assurers        1
1127
 
attendants      1
1128
 
bedlam  1
1129
 
bedpost 1
1130
 
boasted 1
1131
 
SET SQL_BIG_TABLES=1;
1132
 
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
1133
 
fld3    count(*)
1134
 
affixed 1
1135
 
and     1
1136
 
annoyers        1
1137
 
Anthony 1
1138
 
assayed 1
1139
 
assurers        1
1140
 
attendants      1
1141
 
bedlam  1
1142
 
bedpost 1
1143
 
boasted 1
1144
 
SET SQL_BIG_TABLES=0;
1145
 
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
1146
 
fld3    repeat("a",length(fld3))        count(*)
1147
 
circus  aaaaaa  1
1148
 
cited   aaaaa   1
1149
 
Colombo aaaaaaa 1
1150
 
congresswoman   aaaaaaaaaaaaa   1
1151
 
contrition      aaaaaaaaaa      1
1152
 
corny   aaaaa   1
1153
 
cultivation     aaaaaaaaaaa     1
1154
 
definiteness    aaaaaaaaaaaa    1
1155
 
demultiplex     aaaaaaaaaaa     1
1156
 
disappointing   aaaaaaaaaaaaa   1
1157
 
select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2;
1158
 
companynr       rtrim(space(512+companynr))
1159
 
37      
1160
 
78      
1161
 
101     
1162
 
154     
1163
 
311     
1164
 
447     
1165
 
512     
1166
 
select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3;
1167
 
fld3
1168
 
explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3;
1169
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1170
 
1       SIMPLE  t2      ALL     fld1    NULL    NULL    NULL    1199    Using where; Using temporary; Using filesort
1171
 
1       SIMPLE  t3      eq_ref  PRIMARY PRIMARY 4       test.t2.fld1    1       Using index
1172
 
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
1173
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1174
 
1       SIMPLE  t1      ALL     period  NULL    NULL    NULL    41810   Using temporary; Using filesort
1175
 
1       SIMPLE  t3      ref     period  period  4       test.t1.period  4181    
1176
 
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
1177
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1178
 
1       SIMPLE  t3      index   period  period  4       NULL    1       
1179
 
1       SIMPLE  t1      ref     period  period  4       test.t3.period  4181    
1180
 
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
1181
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1182
 
1       SIMPLE  t1      index   period  period  4       NULL    1       
1183
 
1       SIMPLE  t3      ref     period  period  4       test.t1.period  4181    
1184
 
select period from t1;
1185
 
period
1186
 
9410
1187
 
select period from t1 where period=1900;
1188
 
period
1189
 
select fld3,period from t1,t2 where fld1 = 011401 order by period;
1190
 
fld3    period
1191
 
breaking        9410
1192
 
select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001;
1193
 
fld3    period
1194
 
breaking        1001
1195
 
explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period;
1196
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1197
 
1       SIMPLE  t2      const   fld1    fld1    4       const   1       
1198
 
1       SIMPLE  t3      const   PRIMARY,period  PRIMARY 4       const   1       
1199
 
select fld3,period from t2,t1 where companynr*10 = 37*10;
1200
 
fld3    period
1201
 
breaking        9410
1202
 
Romans  9410
1203
 
intercepted     9410
1204
 
bewilderingly   9410
1205
 
astound 9410
1206
 
admonishing     9410
1207
 
sumac   9410
1208
 
flanking        9410
1209
 
combed  9410
1210
 
subjective      9410
1211
 
scatterbrain    9410
1212
 
Eulerian        9410
1213
 
Kane    9410
1214
 
overlay 9410
1215
 
perturb 9410
1216
 
goblins 9410
1217
 
annihilates     9410
1218
 
Wotan   9410
1219
 
snatching       9410
1220
 
concludes       9410
1221
 
laterally       9410
1222
 
yelped  9410
1223
 
grazing 9410
1224
 
Baird   9410
1225
 
celery  9410
1226
 
misunderstander 9410
1227
 
handgun 9410
1228
 
foldout 9410
1229
 
mystic  9410
1230
 
succumbed       9410
1231
 
Nabisco 9410
1232
 
fingerings      9410
1233
 
aging   9410
1234
 
afield  9410
1235
 
ammonium        9410
1236
 
boat    9410
1237
 
intelligibility 9410
1238
 
Augustine       9410
1239
 
teethe  9410
1240
 
dreaded 9410
1241
 
scholastics     9410
1242
 
audiology       9410
1243
 
wallet  9410
1244
 
parters 9410
1245
 
eschew  9410
1246
 
quitter 9410
1247
 
neat    9410
1248
 
Steinberg       9410
1249
 
jarring 9410
1250
 
tinily  9410
1251
 
balled  9410
1252
 
persist 9410
1253
 
attainments     9410
1254
 
fanatic 9410
1255
 
measures        9410
1256
 
rightfulness    9410
1257
 
capably 9410
1258
 
impulsive       9410
1259
 
starlet 9410
1260
 
terminators     9410
1261
 
untying 9410
1262
 
announces       9410
1263
 
featherweight   9410
1264
 
pessimist       9410
1265
 
daughter        9410
1266
 
decliner        9410
1267
 
lawgiver        9410
1268
 
stated  9410
1269
 
readable        9410
1270
 
attrition       9410
1271
 
cascade 9410
1272
 
motors  9410
1273
 
interrogate     9410
1274
 
pests   9410
1275
 
stairway        9410
1276
 
dopers  9410
1277
 
testicle        9410
1278
 
Parsifal        9410
1279
 
leavings        9410
1280
 
postulation     9410
1281
 
squeaking       9410
1282
 
contrasted      9410
1283
 
leftover        9410
1284
 
whiteners       9410
1285
 
erases  9410
1286
 
Punjab  9410
1287
 
Merritt 9410
1288
 
Quixotism       9410
1289
 
sweetish        9410
1290
 
dogging 9410
1291
 
scornfully      9410
1292
 
bellow  9410
1293
 
bills   9410
1294
 
cupboard        9410
1295
 
sureties        9410
1296
 
puddings        9410
1297
 
fetters 9410
1298
 
bivalves        9410
1299
 
incurring       9410
1300
 
Adolph  9410
1301
 
pithed  9410
1302
 
Miles   9410
1303
 
trimmings       9410
1304
 
tragedies       9410
1305
 
skulking        9410
1306
 
flint   9410
1307
 
flopping        9410
1308
 
relaxing        9410
1309
 
offload 9410
1310
 
suites  9410
1311
 
lists   9410
1312
 
animized        9410
1313
 
multilayer      9410
1314
 
standardizes    9410
1315
 
Judas   9410
1316
 
vacuuming       9410
1317
 
dentally        9410
1318
 
humanness       9410
1319
 
inch    9410
1320
 
Weissmuller     9410
1321
 
irresponsibly   9410
1322
 
luckily 9410
1323
 
culled  9410
1324
 
medical 9410
1325
 
bloodbath       9410
1326
 
subschema       9410
1327
 
animals 9410
1328
 
Micronesia      9410
1329
 
repetitions     9410
1330
 
Antares 9410
1331
 
ventilate       9410
1332
 
pityingly       9410
1333
 
interdependent  9410
1334
 
Graves  9410
1335
 
neonatal        9410
1336
 
chafe   9410
1337
 
honoring        9410
1338
 
realtor 9410
1339
 
elite   9410
1340
 
funereal        9410
1341
 
abrogating      9410
1342
 
sorters 9410
1343
 
Conley  9410
1344
 
lectured        9410
1345
 
Abraham 9410
1346
 
Hawaii  9410
1347
 
cage    9410
1348
 
hushes  9410
1349
 
Simla   9410
1350
 
reporters       9410
1351
 
Dutchman        9410
1352
 
descendants     9410
1353
 
groupings       9410
1354
 
dissociate      9410
1355
 
coexist 9410
1356
 
Beebe   9410
1357
 
Taoism  9410
1358
 
Connally        9410
1359
 
fetched 9410
1360
 
checkpoints     9410
1361
 
rusting 9410
1362
 
galling 9410
1363
 
obliterates     9410
1364
 
traitor 9410
1365
 
resumes 9410
1366
 
analyzable      9410
1367
 
terminator      9410
1368
 
gritty  9410
1369
 
firearm 9410
1370
 
minima  9410
1371
 
Selfridge       9410
1372
 
disable 9410
1373
 
witchcraft      9410
1374
 
betroth 9410
1375
 
Manhattanize    9410
1376
 
imprint 9410
1377
 
peeked  9410
1378
 
swelling        9410
1379
 
interrelationships      9410
1380
 
riser   9410
1381
 
Gandhian        9410
1382
 
peacock 9410
1383
 
bee     9410
1384
 
kanji   9410
1385
 
dental  9410
1386
 
scarf   9410
1387
 
chasm   9410
1388
 
insolence       9410
1389
 
syndicate       9410
1390
 
alike   9410
1391
 
imperial        9410
1392
 
convulsion      9410
1393
 
railway 9410
1394
 
validate        9410
1395
 
normalizes      9410
1396
 
comprehensive   9410
1397
 
chewing 9410
1398
 
denizen 9410
1399
 
schemer 9410
1400
 
chronicle       9410
1401
 
Kline   9410
1402
 
Anatole 9410
1403
 
partridges      9410
1404
 
brunch  9410
1405
 
recruited       9410
1406
 
dimensions      9410
1407
 
Chicana 9410
1408
 
announced       9410
1409
 
praised 9410
1410
 
employing       9410
1411
 
linear  9410
1412
 
quagmire        9410
1413
 
western 9410
1414
 
relishing       9410
1415
 
serving 9410
1416
 
scheduling      9410
1417
 
lore    9410
1418
 
eventful        9410
1419
 
arteriole       9410
1420
 
disentangle     9410
1421
 
cured   9410
1422
 
Fenton  9410
1423
 
avoidable       9410
1424
 
drains  9410
1425
 
detectably      9410
1426
 
husky   9410
1427
 
impelling       9410
1428
 
undoes  9410
1429
 
evened  9410
1430
 
squeezes        9410
1431
 
destroyer       9410
1432
 
rudeness        9410
1433
 
beaner  9410
1434
 
boorish 9410
1435
 
Everhart        9410
1436
 
encompass       9410
1437
 
mushrooms       9410
1438
 
Alison  9410
1439
 
externally      9410
1440
 
pellagra        9410
1441
 
cult    9410
1442
 
creek   9410
1443
 
Huffman 9410
1444
 
Majorca 9410
1445
 
governing       9410
1446
 
gadfly  9410
1447
 
reassigned      9410
1448
 
intentness      9410
1449
 
craziness       9410
1450
 
psychic 9410
1451
 
squabbled       9410
1452
 
burlesque       9410
1453
 
capped  9410
1454
 
extracted       9410
1455
 
DiMaggio        9410
1456
 
exclamation     9410
1457
 
subdirectory    9410
1458
 
Gothicism       9410
1459
 
feminine        9410
1460
 
metaphysically  9410
1461
 
sanding 9410
1462
 
Miltonism       9410
1463
 
freakish        9410
1464
 
index   9410
1465
 
straight        9410
1466
 
flurried        9410
1467
 
denotative      9410
1468
 
coming  9410
1469
 
commencements   9410
1470
 
gentleman       9410
1471
 
gifted  9410
1472
 
Shanghais       9410
1473
 
sportswriting   9410
1474
 
sloping 9410
1475
 
navies  9410
1476
 
leaflet 9410
1477
 
shooter 9410
1478
 
Joplin  9410
1479
 
babies  9410
1480
 
assails 9410
1481
 
admiring        9410
1482
 
swaying 9410
1483
 
Goldstine       9410
1484
 
fitting 9410
1485
 
Norwalk 9410
1486
 
analogy 9410
1487
 
deludes 9410
1488
 
cokes   9410
1489
 
Clayton 9410
1490
 
exhausts        9410
1491
 
causality       9410
1492
 
sating  9410
1493
 
icon    9410
1494
 
throttles       9410
1495
 
communicants    9410
1496
 
dehydrate       9410
1497
 
priceless       9410
1498
 
publicly        9410
1499
 
incidentals     9410
1500
 
commonplace     9410
1501
 
mumbles 9410
1502
 
furthermore     9410
1503
 
cautioned       9410
1504
 
parametrized    9410
1505
 
registration    9410
1506
 
sadly   9410
1507
 
positioning     9410
1508
 
babysitting     9410
1509
 
eternal 9410
1510
 
hoarder 9410
1511
 
congregates     9410
1512
 
rains   9410
1513
 
workers 9410
1514
 
sags    9410
1515
 
unplug  9410
1516
 
garage  9410
1517
 
boulder 9410
1518
 
specifics       9410
1519
 
Teresa  9410
1520
 
Winsett 9410
1521
 
convenient      9410
1522
 
buckboards      9410
1523
 
amenities       9410
1524
 
resplendent     9410
1525
 
sews    9410
1526
 
participated    9410
1527
 
Simon   9410
1528
 
certificates    9410
1529
 
Fitzpatrick     9410
1530
 
Evanston        9410
1531
 
misted  9410
1532
 
textures        9410
1533
 
save    9410
1534
 
count   9410
1535
 
rightful        9410
1536
 
chaperone       9410
1537
 
Lizzy   9410
1538
 
clenched        9410
1539
 
effortlessly    9410
1540
 
accessed        9410
1541
 
beaters 9410
1542
 
Hornblower      9410
1543
 
vests   9410
1544
 
indulgences     9410
1545
 
infallibly      9410
1546
 
unwilling       9410
1547
 
excrete 9410
1548
 
spools  9410
1549
 
crunches        9410
1550
 
overestimating  9410
1551
 
ineffective     9410
1552
 
humiliation     9410
1553
 
sophomore       9410
1554
 
star    9410
1555
 
rifles  9410
1556
 
dialysis        9410
1557
 
arriving        9410
1558
 
indulge 9410
1559
 
clockers        9410
1560
 
languages       9410
1561
 
Antarctica      9410
1562
 
percentage      9410
1563
 
ceiling 9410
1564
 
specification   9410
1565
 
regimented      9410
1566
 
ciphers 9410
1567
 
pictures        9410
1568
 
serpents        9410
1569
 
allot   9410
1570
 
realized        9410
1571
 
mayoral 9410
1572
 
opaquely        9410
1573
 
hostess 9410
1574
 
fiftieth        9410
1575
 
incorrectly     9410
1576
 
decomposition   9410
1577
 
stranglings     9410
1578
 
mixture 9410
1579
 
electroencephalography  9410
1580
 
similarities    9410
1581
 
charges 9410
1582
 
freest  9410
1583
 
Greenberg       9410
1584
 
tinting 9410
1585
 
expelled        9410
1586
 
warm    9410
1587
 
smoothed        9410
1588
 
deductions      9410
1589
 
Romano  9410
1590
 
bitterroot      9410
1591
 
corset  9410
1592
 
securing        9410
1593
 
environing      9410
1594
 
cute    9410
1595
 
Crays   9410
1596
 
heiress 9410
1597
 
inform  9410
1598
 
avenge  9410
1599
 
universals      9410
1600
 
Kinsey  9410
1601
 
ravines 9410
1602
 
bestseller      9410
1603
 
equilibrium     9410
1604
 
extents 9410
1605
 
relatively      9410
1606
 
pressure        9410
1607
 
critiques       9410
1608
 
befouled        9410
1609
 
rightfully      9410
1610
 
mechanizing     9410
1611
 
Latinizes       9410
1612
 
timesharing     9410
1613
 
Aden    9410
1614
 
embassies       9410
1615
 
males   9410
1616
 
shapelessly     9410
1617
 
mastering       9410
1618
 
Newtonian       9410
1619
 
finishers       9410
1620
 
abates  9410
1621
 
teem    9410
1622
 
kiting  9410
1623
 
stodgy  9410
1624
 
feed    9410
1625
 
guitars 9410
1626
 
airships        9410
1627
 
store   9410
1628
 
denounces       9410
1629
 
Pyle    9410
1630
 
Saxony  9410
1631
 
serializations  9410
1632
 
Peruvian        9410
1633
 
taxonomically   9410
1634
 
kingdom 9410
1635
 
stint   9410
1636
 
Sault   9410
1637
 
faithful        9410
1638
 
Ganymede        9410
1639
 
tidiness        9410
1640
 
gainful 9410
1641
 
contrary        9410
1642
 
Tipperary       9410
1643
 
tropics 9410
1644
 
theorizers      9410
1645
 
renew   9410
1646
 
already 9410
1647
 
terminal        9410
1648
 
Hegelian        9410
1649
 
hypothesizer    9410
1650
 
warningly       9410
1651
 
journalizing    9410
1652
 
nested  9410
1653
 
Lars    9410
1654
 
saplings        9410
1655
 
foothill        9410
1656
 
labeled 9410
1657
 
imperiously     9410
1658
 
reporters       9410
1659
 
furnishings     9410
1660
 
precipitable    9410
1661
 
discounts       9410
1662
 
excises 9410
1663
 
Stalin  9410
1664
 
despot  9410
1665
 
ripeness        9410
1666
 
Arabia  9410
1667
 
unruly  9410
1668
 
mournfulness    9410
1669
 
boom    9410
1670
 
slaughter       9410
1671
 
Sabine  9410
1672
 
handy   9410
1673
 
rural   9410
1674
 
organizer       9410
1675
 
shipyard        9410
1676
 
civics  9410
1677
 
inaccuracy      9410
1678
 
rules   9410
1679
 
juveniles       9410
1680
 
comprised       9410
1681
 
investigations  9410
1682
 
stabilizes      9410
1683
 
seminaries      9410
1684
 
Hunter  9410
1685
 
sporty  9410
1686
 
test    9410
1687
 
weasels 9410
1688
 
CERN    9410
1689
 
tempering       9410
1690
 
afore   9410
1691
 
Galatean        9410
1692
 
techniques      9410
1693
 
error   9410
1694
 
veranda 9410
1695
 
severely        9410
1696
 
Cassites        9410
1697
 
forthcoming     9410
1698
 
guides  9410
1699
 
vanish  9410
1700
 
lied    9410
1701
 
sawtooth        9410
1702
 
fated   9410
1703
 
gradually       9410
1704
 
widens  9410
1705
 
preclude        9410
1706
 
evenhandedly    9410
1707
 
percentage      9410
1708
 
disobedience    9410
1709
 
humility        9410
1710
 
gleaning        9410
1711
 
petted  9410
1712
 
bloater 9410
1713
 
minion  9410
1714
 
marginal        9410
1715
 
apiary  9410
1716
 
measures        9410
1717
 
precaution      9410
1718
 
repelled        9410
1719
 
primary 9410
1720
 
coverings       9410
1721
 
Artemia 9410
1722
 
navigate        9410
1723
 
spatial 9410
1724
 
Gurkha  9410
1725
 
meanwhile       9410
1726
 
Melinda 9410
1727
 
Butterfield     9410
1728
 
Aldrich 9410
1729
 
previewing      9410
1730
 
glut    9410
1731
 
unaffected      9410
1732
 
inmate  9410
1733
 
mineral 9410
1734
 
impending       9410
1735
 
meditation      9410
1736
 
ideas   9410
1737
 
miniaturizes    9410
1738
 
lewdly  9410
1739
 
title   9410
1740
 
youthfulness    9410
1741
 
creak   9410
1742
 
Chippewa        9410
1743
 
clamored        9410
1744
 
freezes 9410
1745
 
forgivably      9410
1746
 
reduce  9410
1747
 
McGovern        9410
1748
 
Nazis   9410
1749
 
epistle 9410
1750
 
socializes      9410
1751
 
conceptions     9410
1752
 
Kevin   9410
1753
 
uncovering      9410
1754
 
chews   9410
1755
 
appendixes      9410
1756
 
appendixes      9410
1757
 
appendixes      9410
1758
 
appendixes      9410
1759
 
appendixes      9410
1760
 
appendixes      9410
1761
 
raining 9410
1762
 
infest  9410
1763
 
compartment     9410
1764
 
minting 9410
1765
 
ducks   9410
1766
 
roped   9410
1767
 
waltz   9410
1768
 
Lillian 9410
1769
 
repressions     9410
1770
 
chillingly      9410
1771
 
noncritical     9410
1772
 
lithograph      9410
1773
 
spongers        9410
1774
 
parenthood      9410
1775
 
posed   9410
1776
 
instruments     9410
1777
 
filial  9410
1778
 
fixedly 9410
1779
 
relives 9410
1780
 
Pandora 9410
1781
 
watering        9410
1782
 
ungrateful      9410
1783
 
secures 9410
1784
 
poison  9410
1785
 
dusted  9410
1786
 
encompasses     9410
1787
 
presentation    9410
1788
 
Kantian 9410
1789
 
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price;
1790
 
fld3    period  price   price2
1791
 
admonishing     1002    28357832        8723648
1792
 
analyzable      1002    28357832        8723648
1793
 
annihilates     1001    5987435 234724
1794
 
Antares 1002    28357832        8723648
1795
 
astound 1001    5987435 234724
1796
 
audiology       1001    5987435 234724
1797
 
Augustine       1002    28357832        8723648
1798
 
Baird   1002    28357832        8723648
1799
 
bewilderingly   1001    5987435 234724
1800
 
breaking        1001    5987435 234724
1801
 
Conley  1001    5987435 234724
1802
 
dentally        1002    28357832        8723648
1803
 
dissociate      1002    28357832        8723648
1804
 
elite   1001    5987435 234724
1805
 
eschew  1001    5987435 234724
1806
 
Eulerian        1001    5987435 234724
1807
 
flanking        1001    5987435 234724
1808
 
foldout 1002    28357832        8723648
1809
 
funereal        1002    28357832        8723648
1810
 
galling 1002    28357832        8723648
1811
 
Graves  1001    5987435 234724
1812
 
grazing 1001    5987435 234724
1813
 
groupings       1001    5987435 234724
1814
 
handgun 1001    5987435 234724
1815
 
humility        1002    28357832        8723648
1816
 
impulsive       1002    28357832        8723648
1817
 
inch    1001    5987435 234724
1818
 
intelligibility 1001    5987435 234724
1819
 
jarring 1001    5987435 234724
1820
 
lawgiver        1001    5987435 234724
1821
 
lectured        1002    28357832        8723648
1822
 
Merritt 1002    28357832        8723648
1823
 
neonatal        1001    5987435 234724
1824
 
offload 1002    28357832        8723648
1825
 
parters 1002    28357832        8723648
1826
 
pityingly       1002    28357832        8723648
1827
 
puddings        1002    28357832        8723648
1828
 
Punjab  1001    5987435 234724
1829
 
quitter 1002    28357832        8723648
1830
 
realtor 1001    5987435 234724
1831
 
relaxing        1001    5987435 234724
1832
 
repetitions     1001    5987435 234724
1833
 
resumes 1001    5987435 234724
1834
 
Romans  1002    28357832        8723648
1835
 
rusting 1001    5987435 234724
1836
 
scholastics     1001    5987435 234724
1837
 
skulking        1002    28357832        8723648
1838
 
stated  1002    28357832        8723648
1839
 
suites  1002    28357832        8723648
1840
 
sureties        1001    5987435 234724
1841
 
testicle        1002    28357832        8723648
1842
 
tinily  1002    28357832        8723648
1843
 
tragedies       1001    5987435 234724
1844
 
trimmings       1001    5987435 234724
1845
 
vacuuming       1001    5987435 234724
1846
 
ventilate       1001    5987435 234724
1847
 
wallet  1001    5987435 234724
1848
 
Weissmuller     1002    28357832        8723648
1849
 
Wotan   1002    28357832        8723648
1850
 
select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37;
1851
 
fld1    fld3    period  price   price2
1852
 
18201   relaxing        1001    5987435 234724
1853
 
18601   vacuuming       1001    5987435 234724
1854
 
18801   inch    1001    5987435 234724
1855
 
18811   repetitions     1001    5987435 234724
1856
 
19101   ventilate       1001    5987435 234724
1857
 
19201   Graves  1001    5987435 234724
1858
 
30501   neonatal        1001    5987435 234724
1859
 
31901   realtor 1001    5987435 234724
1860
 
36001   elite   1001    5987435 234724
1861
 
38001   Conley  1001    5987435 234724
1862
 
38011   groupings       1001    5987435 234724
1863
 
38101   rusting 1001    5987435 234724
1864
 
38201   resumes 1001    5987435 234724
1865
 
create table t4 (
1866
 
companynr int NOT NULL default '00',
1867
 
companyname char(30) NOT NULL default '',
1868
 
PRIMARY KEY (companynr),
1869
 
UNIQUE KEY companyname(companyname)
1870
 
) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames';
1871
 
select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
1872
 
companynr       companyname
1873
 
0       Unknown
1874
 
29      company 1
1875
 
34      company 2
1876
 
36      company 3
1877
 
37      company 4
1878
 
40      company 5
1879
 
41      company 6
1880
 
50      company 11
1881
 
53      company 7
1882
 
58      company 8
1883
 
65      company 9
1884
 
68      company 10
1885
 
select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr;
1886
 
companynr       companyname
1887
 
0       Unknown
1888
 
29      company 1
1889
 
34      company 2
1890
 
36      company 3
1891
 
37      company 4
1892
 
40      company 5
1893
 
41      company 6
1894
 
50      company 11
1895
 
53      company 7
1896
 
58      company 8
1897
 
65      company 9
1898
 
68      company 10
1899
 
select * from t1,t1 t12;
1900
 
Period  Varor_period    Period  Varor_period
1901
 
9410    9412    9410    9412
1902
 
select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505;
1903
 
fld1    fld1
1904
 
250501  250501
1905
 
250502  250501
1906
 
250503  250501
1907
 
250504  250501
1908
 
250505  250501
1909
 
250501  250502
1910
 
250502  250502
1911
 
250503  250502
1912
 
250504  250502
1913
 
250505  250502
1914
 
250501  250503
1915
 
250502  250503
1916
 
250503  250503
1917
 
250504  250503
1918
 
250505  250503
1919
 
250501  250504
1920
 
250502  250504
1921
 
250503  250504
1922
 
250504  250504
1923
 
250505  250504
1924
 
250501  250505
1925
 
250502  250505
1926
 
250503  250505
1927
 
250504  250505
1928
 
250505  250505
1929
 
insert into t2 (fld1, companynr) values (999999,99);
1930
 
select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
1931
 
companynr       companyname
1932
 
99      NULL
1933
 
select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null;
1934
 
count(*)
1935
 
1199
1936
 
explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
1937
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1938
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1200    
1939
 
1       SIMPLE  t4      eq_ref  PRIMARY PRIMARY 4       test.t2.companynr       1       Using where; Not exists
1940
 
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
1941
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1942
 
1       SIMPLE  t4      ALL     NULL    NULL    NULL    NULL    12      
1943
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1200    Using where; Not exists
1944
 
select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
1945
 
companynr       companyname
1946
 
select count(*) from t2 left join t4 using (companynr) where companynr is not null;
1947
 
count(*)
1948
 
1200
1949
 
explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null;
1950
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1951
 
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE
1952
 
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null;
1953
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1954
 
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE
1955
 
delete from t2 where fld1=999999;
1956
 
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
1957
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1958
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where
1959
 
1       SIMPLE  t4      eq_ref  PRIMARY PRIMARY 4       test.t2.companynr       1       
1960
 
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
1961
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1962
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where
1963
 
1       SIMPLE  t4      eq_ref  PRIMARY PRIMARY 4       test.t2.companynr       1       
1964
 
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
1965
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1966
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where
1967
 
1       SIMPLE  t4      eq_ref  PRIMARY PRIMARY 4       test.t2.companynr       1       
1968
 
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
1969
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1970
 
1       SIMPLE  t4      ALL     PRIMARY NULL    NULL    NULL    12      Using where
1971
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    
1972
 
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0;
1973
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1974
 
1       SIMPLE  t4      ALL     PRIMARY NULL    NULL    NULL    12      Using where
1975
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    
1976
 
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0;
1977
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1978
 
1       SIMPLE  t4      ALL     PRIMARY NULL    NULL    NULL    12      Using where
1979
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    
1980
 
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
1981
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1982
 
1       SIMPLE  t4      ALL     NULL    NULL    NULL    NULL    12      
1983
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where
1984
 
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
1985
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1986
 
1       SIMPLE  t4      ALL     PRIMARY NULL    NULL    NULL    12      
1987
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where
1988
 
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
1989
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1990
 
1       SIMPLE  t4      ALL     NULL    NULL    NULL    NULL    12      
1991
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where
1992
 
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null;
1993
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1994
 
1       SIMPLE  t4      ALL     PRIMARY NULL    NULL    NULL    12      Using where
1995
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    
1996
 
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0;
1997
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
1998
 
1       SIMPLE  t4      ALL     PRIMARY NULL    NULL    NULL    12      Using where
1999
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    
2000
 
explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0;
2001
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2002
 
1       SIMPLE  t4      ALL     NULL    NULL    NULL    NULL    12      Using where
2003
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    
2004
 
select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
2005
 
companynr       companynr
2006
 
37      36
2007
 
41      40
2008
 
explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
2009
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2010
 
1       SIMPLE  t4      index   NULL    PRIMARY 4       NULL    12      Using index; Using temporary
2011
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    Using where; Using join buffer
2012
 
select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008;
2013
 
fld1    companynr       fld3    period
2014
 
38008   37      reporters       1008
2015
 
38208   37      Selfridge       1008
2016
 
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
2017
 
fld1    companynr       fld3    period
2018
 
38008   37      reporters       1008
2019
 
38208   37      Selfridge       1008
2020
 
select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009;
2021
 
fld1    companynr       fld3    period
2022
 
38008   37      reporters       1008
2023
 
38208   37      Selfridge       1008
2024
 
select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909);
2025
 
period
2026
 
9410
2027
 
select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6)));
2028
 
period
2029
 
9410
2030
 
select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1;
2031
 
fld1
2032
 
250501
2033
 
250502
2034
 
250503
2035
 
250505
2036
 
select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606);
2037
 
fld1
2038
 
250502
2039
 
250503
2040
 
select fld1 from t2 where fld1 between 250502 and 250504;
2041
 
fld1
2042
 
250502
2043
 
250503
2044
 
250504
2045
 
select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ;
2046
 
fld3
2047
 
label
2048
 
labeled
2049
 
labeled
2050
 
landslide
2051
 
laterally
2052
 
leaflet
2053
 
lewdly
2054
 
Lillian
2055
 
luckily
2056
 
select count(*) from t1;
2057
 
count(*)
2058
 
1
2059
 
select companynr,count(*),sum(fld1) from t2 group by companynr;
2060
 
companynr       count(*)        sum(fld1)
2061
 
0       82      10355753
2062
 
29      95      14473298
2063
 
34      70      17788966
2064
 
36      215     22786296
2065
 
37      588     83602098
2066
 
40      37      6618386
2067
 
41      52      12816335
2068
 
50      11      1595438
2069
 
53      4       793210
2070
 
58      23      2254293
2071
 
65      10      2284055
2072
 
68      12      3097288
2073
 
select companynr,count(*) from t2 group by companynr order by companynr desc limit 5;
2074
 
companynr       count(*)
2075
 
68      12
2076
 
65      10
2077
 
58      23
2078
 
53      4
2079
 
50      11
2080
 
select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
2081
 
count(*)        min(fld4)       max(fld4)       sum(fld1)       avg(fld1)       std(fld1)       variance(fld1)
2082
 
70      absentee        vest    17788966        254128.0857     3272.5940       10709871.3069
2083
 
explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>"";
2084
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
2085
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    100.00  Using where
2086
 
Warnings:
2087
 
Note    1003    select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where ((`test`.`t2`.`companynr` = 34) and (`test`.`t2`.`fld4` <> ''))
2088
 
select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3;
2089
 
companynr       count(*)        min(fld4)       max(fld4)       sum(fld1)       avg(fld1)       std(fld1)       variance(fld1)
2090
 
0       82      Anthony windmills       10355753        126289.6707     115550.9757     13352027981.7087
2091
 
29      95      abut    wetness 14473298        152350.5053     8368.5480       70032594.9026
2092
 
34      70      absentee        vest    17788966        254128.0857     3272.5940       10709871.3069
2093
 
select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
2094
 
companynr       t2nr    count(price)    sum(price)      min(price)      max(price)      avg(price)
2095
 
37      1       1       5987435 5987435 5987435 5987435.0000
2096
 
37      2       1       28357832        28357832        28357832        28357832.0000
2097
 
37      3       1       39654943        39654943        39654943        39654943.0000
2098
 
37      11      1       5987435 5987435 5987435 5987435.0000
2099
 
37      12      1       28357832        28357832        28357832        28357832.0000
2100
 
37      13      1       39654943        39654943        39654943        39654943.0000
2101
 
37      21      1       5987435 5987435 5987435 5987435.0000
2102
 
37      22      1       28357832        28357832        28357832        28357832.0000
2103
 
37      23      1       39654943        39654943        39654943        39654943.0000
2104
 
37      31      1       5987435 5987435 5987435 5987435.0000
2105
 
select /*! SQL_SMALL_RESULT */ companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10;
2106
 
companynr       t2nr    count(price)    sum(price)      min(price)      max(price)      avg(price)
2107
 
37      1       1       5987435 5987435 5987435 5987435.0000
2108
 
37      2       1       28357832        28357832        28357832        28357832.0000
2109
 
37      3       1       39654943        39654943        39654943        39654943.0000
2110
 
37      11      1       5987435 5987435 5987435 5987435.0000
2111
 
37      12      1       28357832        28357832        28357832        28357832.0000
2112
 
37      13      1       39654943        39654943        39654943        39654943.0000
2113
 
37      21      1       5987435 5987435 5987435 5987435.0000
2114
 
37      22      1       28357832        28357832        28357832        28357832.0000
2115
 
37      23      1       39654943        39654943        39654943        39654943.0000
2116
 
37      31      1       5987435 5987435 5987435 5987435.0000
2117
 
select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ;
2118
 
companynr       count(price)    sum(price)      min(price)      max(price)      avg(price)
2119
 
37      12543   309394878010    5987435 39654943        24666736.6667
2120
 
78      8362    414611089292    726498  98439034        49582766.0000
2121
 
101     4181    3489454238      834598  834598  834598.0000
2122
 
154     4181    4112197254950   983543950       983543950       983543950.0000
2123
 
311     4181    979599938       234298  234298  234298.0000
2124
 
447     4181    9929180954      2374834 2374834 2374834.0000
2125
 
512     4181    3288532102      786542  786542  786542.0000
2126
 
select distinct mod(companynr,10) from t4 group by companynr;
2127
 
mod(companynr,10)
2128
 
0
2129
 
9
2130
 
4
2131
 
6
2132
 
7
2133
 
1
2134
 
3
2135
 
8
2136
 
5
2137
 
select distinct 1 from t4 group by companynr;
2138
 
1
2139
 
1
2140
 
select count(distinct fld1) from t2;
2141
 
count(distinct fld1)
2142
 
1199
2143
 
select companynr,count(distinct fld1) from t2 group by companynr;
2144
 
companynr       count(distinct fld1)
2145
 
0       82
2146
 
29      95
2147
 
34      70
2148
 
36      215
2149
 
37      588
2150
 
40      37
2151
 
41      52
2152
 
50      11
2153
 
53      4
2154
 
58      23
2155
 
65      10
2156
 
68      12
2157
 
select companynr,count(*) from t2 group by companynr;
2158
 
companynr       count(*)
2159
 
0       82
2160
 
29      95
2161
 
34      70
2162
 
36      215
2163
 
37      588
2164
 
40      37
2165
 
41      52
2166
 
50      11
2167
 
53      4
2168
 
58      23
2169
 
65      10
2170
 
68      12
2171
 
select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr;
2172
 
companynr       count(distinct concat(fld1,repeat(65,1000)))
2173
 
0       82
2174
 
29      95
2175
 
34      70
2176
 
36      215
2177
 
37      588
2178
 
40      37
2179
 
41      52
2180
 
50      11
2181
 
53      4
2182
 
58      23
2183
 
65      10
2184
 
68      12
2185
 
select companynr,count(distinct concat(fld1,repeat(65,200))) from t2 group by companynr;
2186
 
companynr       count(distinct concat(fld1,repeat(65,200)))
2187
 
0       82
2188
 
29      95
2189
 
34      70
2190
 
36      215
2191
 
37      588
2192
 
40      37
2193
 
41      52
2194
 
50      11
2195
 
53      4
2196
 
58      23
2197
 
65      10
2198
 
68      12
2199
 
select companynr,count(distinct floor(fld1/100)) from t2 group by companynr;
2200
 
companynr       count(distinct floor(fld1/100))
2201
 
0       47
2202
 
29      35
2203
 
34      14
2204
 
36      69
2205
 
37      108
2206
 
40      16
2207
 
41      11
2208
 
50      9
2209
 
53      1
2210
 
58      1
2211
 
65      1
2212
 
68      1
2213
 
select companynr,count(distinct concat(repeat(65,1000),floor(fld1/100))) from t2 group by companynr;
2214
 
companynr       count(distinct concat(repeat(65,1000),floor(fld1/100)))
2215
 
0       47
2216
 
29      35
2217
 
34      14
2218
 
36      69
2219
 
37      108
2220
 
40      16
2221
 
41      11
2222
 
50      9
2223
 
53      1
2224
 
58      1
2225
 
65      1
2226
 
68      1
2227
 
select sum(fld1),fld3 from t2 where fld3="Romans" group by fld1 limit 10;
2228
 
sum(fld1)       fld3
2229
 
11402   Romans
2230
 
select name,count(*) from t3 where name='cloakroom' group by name;
2231
 
name    count(*)
2232
 
cloakroom       4181
2233
 
select name,count(*) from t3 where name='cloakroom' and price>10 group by name;
2234
 
name    count(*)
2235
 
cloakroom       4181
2236
 
select count(*) from t3 where name='cloakroom' and price2=823742;
2237
 
count(*)
2238
 
4181
2239
 
select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name;
2240
 
name    count(*)
2241
 
cloakroom       4181
2242
 
select name,count(*) from t3 where name >= "extramarital" and price <= 39654943 group by name;
2243
 
name    count(*)
2244
 
extramarital    4181
2245
 
gazer   4181
2246
 
gems    4181
2247
 
Iranizes        4181
2248
 
spates  4181
2249
 
tucked  4181
2250
 
violinist       4181
2251
 
select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
2252
 
fld3    count(*)
2253
 
spates  4181
2254
 
select companynr,companyname from t4 group by 1;
2255
 
companynr       companyname
2256
 
0       Unknown
2257
 
29      company 1
2258
 
34      company 2
2259
 
36      company 3
2260
 
37      company 4
2261
 
40      company 5
2262
 
41      company 6
2263
 
50      company 11
2264
 
53      company 7
2265
 
58      company 8
2266
 
65      company 9
2267
 
68      company 10
2268
 
select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by t2.companynr order by companyname;
2269
 
companynr       companyname     count(*)
2270
 
29      company 1       95
2271
 
68      company 10      12
2272
 
50      company 11      11
2273
 
34      company 2       70
2274
 
36      company 3       215
2275
 
37      company 4       588
2276
 
40      company 5       37
2277
 
41      company 6       52
2278
 
53      company 7       4
2279
 
58      company 8       23
2280
 
65      company 9       10
2281
 
0       Unknown 82
2282
 
select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name;
2283
 
fld1    count(*)
2284
 
158402  4181
2285
 
select sum(Period)/count(*) from t1;
2286
 
sum(Period)/count(*)
2287
 
9410.0000
2288
 
select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr;
2289
 
companynr       count   sum     diff    func
2290
 
37      12543   309394878010    0.0000  464091
2291
 
78      8362    414611089292    0.0000  652236
2292
 
101     4181    3489454238      0.0000  422281
2293
 
154     4181    4112197254950   0.0000  643874
2294
 
311     4181    979599938       0.0000  1300291
2295
 
447     4181    9929180954      0.0000  1868907
2296
 
512     4181    3288532102      0.0000  2140672
2297
 
select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg;
2298
 
companynr       avg
2299
 
154     983543950.0000
2300
 
select companynr,count(*) from t2 group by companynr order by 2 desc;
2301
 
companynr       count(*)
2302
 
37      588
2303
 
36      215
2304
 
29      95
2305
 
0       82
2306
 
34      70
2307
 
41      52
2308
 
40      37
2309
 
58      23
2310
 
68      12
2311
 
50      11
2312
 
65      10
2313
 
53      4
2314
 
select companynr,count(*) from t2 where companynr > 40 group by companynr order by 2 desc;
2315
 
companynr       count(*)
2316
 
41      52
2317
 
58      23
2318
 
68      12
2319
 
50      11
2320
 
65      10
2321
 
53      4
2322
 
select t2.fld4,t2.fld1,count(price),sum(price),min(price),max(price),avg(price) from t3,t2 where t3.companynr = 37 and t2.fld1 = t3.t2nr group by fld1,t2.fld4;
2323
 
fld4    fld1    count(price)    sum(price)      min(price)      max(price)      avg(price)
2324
 
teethe  1       1       5987435 5987435 5987435 5987435.0000
2325
 
dreaded 11401   1       5987435 5987435 5987435 5987435.0000
2326
 
scholastics     11402   1       28357832        28357832        28357832        28357832.0000
2327
 
audiology       11403   1       39654943        39654943        39654943        39654943.0000
2328
 
wallet  11501   1       5987435 5987435 5987435 5987435.0000
2329
 
parters 11701   1       5987435 5987435 5987435 5987435.0000
2330
 
eschew  11702   1       28357832        28357832        28357832        28357832.0000
2331
 
quitter 11703   1       39654943        39654943        39654943        39654943.0000
2332
 
neat    12001   1       5987435 5987435 5987435 5987435.0000
2333
 
Steinberg       12003   1       39654943        39654943        39654943        39654943.0000
2334
 
balled  12301   1       5987435 5987435 5987435 5987435.0000
2335
 
persist 12302   1       28357832        28357832        28357832        28357832.0000
2336
 
attainments     12303   1       39654943        39654943        39654943        39654943.0000
2337
 
capably 12501   1       5987435 5987435 5987435 5987435.0000
2338
 
impulsive       12602   1       28357832        28357832        28357832        28357832.0000
2339
 
starlet 12603   1       39654943        39654943        39654943        39654943.0000
2340
 
featherweight   12701   1       5987435 5987435 5987435 5987435.0000
2341
 
pessimist       12702   1       28357832        28357832        28357832        28357832.0000
2342
 
daughter        12703   1       39654943        39654943        39654943        39654943.0000
2343
 
lawgiver        13601   1       5987435 5987435 5987435 5987435.0000
2344
 
stated  13602   1       28357832        28357832        28357832        28357832.0000
2345
 
readable        13603   1       39654943        39654943        39654943        39654943.0000
2346
 
testicle        13801   1       5987435 5987435 5987435 5987435.0000
2347
 
Parsifal        13802   1       28357832        28357832        28357832        28357832.0000
2348
 
leavings        13803   1       39654943        39654943        39654943        39654943.0000
2349
 
squeaking       13901   1       5987435 5987435 5987435 5987435.0000
2350
 
contrasted      16001   1       5987435 5987435 5987435 5987435.0000
2351
 
leftover        16201   1       5987435 5987435 5987435 5987435.0000
2352
 
whiteners       16202   1       28357832        28357832        28357832        28357832.0000
2353
 
erases  16301   1       5987435 5987435 5987435 5987435.0000
2354
 
Punjab  16302   1       28357832        28357832        28357832        28357832.0000
2355
 
Merritt 16303   1       39654943        39654943        39654943        39654943.0000
2356
 
sweetish        18001   1       5987435 5987435 5987435 5987435.0000
2357
 
dogging 18002   1       28357832        28357832        28357832        28357832.0000
2358
 
scornfully      18003   1       39654943        39654943        39654943        39654943.0000
2359
 
fetters 18012   1       28357832        28357832        28357832        28357832.0000
2360
 
bivalves        18013   1       39654943        39654943        39654943        39654943.0000
2361
 
skulking        18021   1       5987435 5987435 5987435 5987435.0000
2362
 
flint   18022   1       28357832        28357832        28357832        28357832.0000
2363
 
flopping        18023   1       39654943        39654943        39654943        39654943.0000
2364
 
Judas   18032   1       28357832        28357832        28357832        28357832.0000
2365
 
vacuuming       18033   1       39654943        39654943        39654943        39654943.0000
2366
 
medical 18041   1       5987435 5987435 5987435 5987435.0000
2367
 
bloodbath       18042   1       28357832        28357832        28357832        28357832.0000
2368
 
subschema       18043   1       39654943        39654943        39654943        39654943.0000
2369
 
interdependent  18051   1       5987435 5987435 5987435 5987435.0000
2370
 
Graves  18052   1       28357832        28357832        28357832        28357832.0000
2371
 
neonatal        18053   1       39654943        39654943        39654943        39654943.0000
2372
 
sorters 18061   1       5987435 5987435 5987435 5987435.0000
2373
 
epistle 18062   1       28357832        28357832        28357832        28357832.0000
2374
 
Conley  18101   1       5987435 5987435 5987435 5987435.0000
2375
 
lectured        18102   1       28357832        28357832        28357832        28357832.0000
2376
 
Abraham 18103   1       39654943        39654943        39654943        39654943.0000
2377
 
cage    18201   1       5987435 5987435 5987435 5987435.0000
2378
 
hushes  18202   1       28357832        28357832        28357832        28357832.0000
2379
 
Simla   18402   1       28357832        28357832        28357832        28357832.0000
2380
 
reporters       18403   1       39654943        39654943        39654943        39654943.0000
2381
 
coexist 18601   1       5987435 5987435 5987435 5987435.0000
2382
 
Beebe   18602   1       28357832        28357832        28357832        28357832.0000
2383
 
Taoism  18603   1       39654943        39654943        39654943        39654943.0000
2384
 
Connally        18801   1       5987435 5987435 5987435 5987435.0000
2385
 
fetched 18802   1       28357832        28357832        28357832        28357832.0000
2386
 
checkpoints     18803   1       39654943        39654943        39654943        39654943.0000
2387
 
gritty  18811   1       5987435 5987435 5987435 5987435.0000
2388
 
firearm 18812   1       28357832        28357832        28357832        28357832.0000
2389
 
minima  19101   1       5987435 5987435 5987435 5987435.0000
2390
 
Selfridge       19102   1       28357832        28357832        28357832        28357832.0000
2391
 
disable 19103   1       39654943        39654943        39654943        39654943.0000
2392
 
witchcraft      19201   1       5987435 5987435 5987435 5987435.0000
2393
 
betroth 30501   1       5987435 5987435 5987435 5987435.0000
2394
 
Manhattanize    30502   1       28357832        28357832        28357832        28357832.0000
2395
 
imprint 30503   1       39654943        39654943        39654943        39654943.0000
2396
 
swelling        31901   1       5987435 5987435 5987435 5987435.0000
2397
 
interrelationships      36001   1       5987435 5987435 5987435 5987435.0000
2398
 
riser   36002   1       28357832        28357832        28357832        28357832.0000
2399
 
bee     38001   1       5987435 5987435 5987435 5987435.0000
2400
 
kanji   38002   1       28357832        28357832        28357832        28357832.0000
2401
 
dental  38003   1       39654943        39654943        39654943        39654943.0000
2402
 
railway 38011   1       5987435 5987435 5987435 5987435.0000
2403
 
validate        38012   1       28357832        28357832        28357832        28357832.0000
2404
 
normalizes      38013   1       39654943        39654943        39654943        39654943.0000
2405
 
Kline   38101   1       5987435 5987435 5987435 5987435.0000
2406
 
Anatole 38102   1       28357832        28357832        28357832        28357832.0000
2407
 
partridges      38103   1       39654943        39654943        39654943        39654943.0000
2408
 
recruited       38201   1       5987435 5987435 5987435 5987435.0000
2409
 
dimensions      38202   1       28357832        28357832        28357832        28357832.0000
2410
 
Chicana 38203   1       39654943        39654943        39654943        39654943.0000
2411
 
select t3.companynr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 group by companynr,fld3;
2412
 
companynr       fld3    sum(price)
2413
 
512     boat    786542
2414
 
512     capably 786542
2415
 
512     cupboard        786542
2416
 
512     decliner        786542
2417
 
512     descendants     786542
2418
 
512     dopers  786542
2419
 
512     erases  786542
2420
 
512     Micronesia      786542
2421
 
512     Miles   786542
2422
 
512     skies   786542
2423
 
select t2.companynr,count(*),min(fld3),max(fld3),sum(price),avg(price) from t2,t3 where t3.companynr >= 30 and t3.companynr <= 58 and t3.t2nr = t2.fld1 and 1+1=2 group by t2.companynr;
2424
 
companynr       count(*)        min(fld3)       max(fld3)       sum(price)      avg(price)
2425
 
0       1       Omaha   Omaha   5987435 5987435.0000
2426
 
36      1       dubbed  dubbed  28357832        28357832.0000
2427
 
37      83      Abraham Wotan   1908978016      22999735.1325
2428
 
50      2       scribbled       tapestry        68012775        34006387.5000
2429
 
select t3.companynr+0,t3.t2nr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 37 group by 1,t3.t2nr,fld3,fld3,fld3,fld3,fld3 order by fld1;
2430
 
t3.companynr+0  t2nr    fld3    sum(price)
2431
 
37      1       Omaha   5987435
2432
 
37      11401   breaking        5987435
2433
 
37      11402   Romans  28357832
2434
 
37      11403   intercepted     39654943
2435
 
37      11501   bewilderingly   5987435
2436
 
37      11701   astound 5987435
2437
 
37      11702   admonishing     28357832
2438
 
37      11703   sumac   39654943
2439
 
37      12001   flanking        5987435
2440
 
37      12003   combed  39654943
2441
 
37      12301   Eulerian        5987435
2442
 
37      12302   dubbed  28357832
2443
 
37      12303   Kane    39654943
2444
 
37      12501   annihilates     5987435
2445
 
37      12602   Wotan   28357832
2446
 
37      12603   snatching       39654943
2447
 
37      12701   grazing 5987435
2448
 
37      12702   Baird   28357832
2449
 
37      12703   celery  39654943
2450
 
37      13601   handgun 5987435
2451
 
37      13602   foldout 28357832
2452
 
37      13603   mystic  39654943
2453
 
37      13801   intelligibility 5987435
2454
 
37      13802   Augustine       28357832
2455
 
37      13803   teethe  39654943
2456
 
37      13901   scholastics     5987435
2457
 
37      16001   audiology       5987435
2458
 
37      16201   wallet  5987435
2459
 
37      16202   parters 28357832
2460
 
37      16301   eschew  5987435
2461
 
37      16302   quitter 28357832
2462
 
37      16303   neat    39654943
2463
 
37      18001   jarring 5987435
2464
 
37      18002   tinily  28357832
2465
 
37      18003   balled  39654943
2466
 
37      18012   impulsive       28357832
2467
 
37      18013   starlet 39654943
2468
 
37      18021   lawgiver        5987435
2469
 
37      18022   stated  28357832
2470
 
37      18023   readable        39654943
2471
 
37      18032   testicle        28357832
2472
 
37      18033   Parsifal        39654943
2473
 
37      18041   Punjab  5987435
2474
 
37      18042   Merritt 28357832
2475
 
37      18043   Quixotism       39654943
2476
 
37      18051   sureties        5987435
2477
 
37      18052   puddings        28357832
2478
 
37      18053   tapestry        39654943
2479
 
37      18061   trimmings       5987435
2480
 
37      18062   humility        28357832
2481
 
37      18101   tragedies       5987435
2482
 
37      18102   skulking        28357832
2483
 
37      18103   flint   39654943
2484
 
37      18201   relaxing        5987435
2485
 
37      18202   offload 28357832
2486
 
37      18402   suites  28357832
2487
 
37      18403   lists   39654943
2488
 
37      18601   vacuuming       5987435
2489
 
37      18602   dentally        28357832
2490
 
37      18603   humanness       39654943
2491
 
37      18801   inch    5987435
2492
 
37      18802   Weissmuller     28357832
2493
 
37      18803   irresponsibly   39654943
2494
 
37      18811   repetitions     5987435
2495
 
37      18812   Antares 28357832
2496
 
37      19101   ventilate       5987435
2497
 
37      19102   pityingly       28357832
2498
 
37      19103   interdependent  39654943
2499
 
37      19201   Graves  5987435
2500
 
37      30501   neonatal        5987435
2501
 
37      30502   scribbled       28357832
2502
 
37      30503   chafe   39654943
2503
 
37      31901   realtor 5987435
2504
 
37      36001   elite   5987435
2505
 
37      36002   funereal        28357832
2506
 
37      38001   Conley  5987435
2507
 
37      38002   lectured        28357832
2508
 
37      38003   Abraham 39654943
2509
 
37      38011   groupings       5987435
2510
 
37      38012   dissociate      28357832
2511
 
37      38013   coexist 39654943
2512
 
37      38101   rusting 5987435
2513
 
37      38102   galling 28357832
2514
 
37      38103   obliterates     39654943
2515
 
37      38201   resumes 5987435
2516
 
37      38202   analyzable      28357832
2517
 
37      38203   terminator      39654943
2518
 
select sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1= t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008;
2519
 
sum(price)
2520
 
234298
2521
 
select t2.fld1,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1 = t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008 or t3.t2nr = t2.fld1 and t2.fld1 = 38008 group by t2.fld1;
2522
 
fld1    sum(price)
2523
 
38008   234298
2524
 
explain select fld3 from t2 where 1>2 or 2>3;
2525
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2526
 
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE
2527
 
explain select fld3 from t2 where fld1=fld1;
2528
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2529
 
1       SIMPLE  t2      ALL     NULL    NULL    NULL    NULL    1199    
2530
 
select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502;
2531
 
companynr       fld1
2532
 
34      250501
2533
 
34      250502
2534
 
select companynr,fld1 from t2 WHERE fld1>=250501 HAVING fld1<=250502;
2535
 
companynr       fld1
2536
 
34      250501
2537
 
34      250502
2538
 
select companynr,count(*) as count,sum(fld1) as sum from t2 group by companynr having count > 40 and sum/count >= 120000;
2539
 
companynr       count   sum
2540
 
0       82      10355753
2541
 
29      95      14473298
2542
 
34      70      17788966
2543
 
37      588     83602098
2544
 
41      52      12816335
2545
 
select companynr from t2 group by companynr having count(*) > 40 and sum(fld1)/count(*) >= 120000 ;
2546
 
companynr
2547
 
0
2548
 
29
2549
 
34
2550
 
37
2551
 
41
2552
 
select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by companyname having t2.companynr >= 40;
2553
 
companynr       companyname     count(*)
2554
 
68      company 10      12
2555
 
50      company 11      11
2556
 
40      company 5       37
2557
 
41      company 6       52
2558
 
53      company 7       4
2559
 
58      company 8       23
2560
 
65      company 9       10
2561
 
select count(*) from t2;
2562
 
count(*)
2563
 
1199
2564
 
select count(*) from t2 where fld1 < 098024;
2565
 
count(*)
2566
 
387
2567
 
select min(fld1) from t2 where fld1>= 098024;
2568
 
min(fld1)
2569
 
98024
2570
 
select max(fld1) from t2 where fld1>= 098024;
2571
 
max(fld1)
2572
 
1232609
2573
 
select count(*) from t3 where price2=76234234;
2574
 
count(*)
2575
 
4181
2576
 
select count(*) from t3 where companynr=512 and price2=76234234;
2577
 
count(*)
2578
 
4181
2579
 
explain select min(fld1),max(fld1),count(*) from t2;
2580
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2581
 
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Select tables optimized away
2582
 
select min(fld1),max(fld1),count(*) from t2;
2583
 
min(fld1)       max(fld1)       count(*)
2584
 
0       1232609 1199
2585
 
select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742;
2586
 
min(t2nr)       max(t2nr)
2587
 
2115    2115
2588
 
select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78;
2589
 
count(*)        min(t2nr)       max(t2nr)
2590
 
4181    4       41804
2591
 
select t2nr,count(*) from t3 where name='gems' group by t2nr limit 20;
2592
 
t2nr    count(*)
2593
 
9       1
2594
 
19      1
2595
 
29      1
2596
 
39      1
2597
 
49      1
2598
 
59      1
2599
 
69      1
2600
 
79      1
2601
 
89      1
2602
 
99      1
2603
 
109     1
2604
 
119     1
2605
 
129     1
2606
 
139     1
2607
 
149     1
2608
 
159     1
2609
 
169     1
2610
 
179     1
2611
 
189     1
2612
 
199     1
2613
 
select max(t2nr) from t3 where price=983543950;
2614
 
max(t2nr)
2615
 
41807
2616
 
select t1.period from t3 = t1 limit 1;
2617
 
period
2618
 
1001
2619
 
select t1.period from t1 as t1 limit 1;
2620
 
period
2621
 
9410
2622
 
select t1.period as "Nuvarande period" from t1 as t1 limit 1;
2623
 
Nuvarande period
2624
 
9410
2625
 
select period as ok_period from t1 limit 1;
2626
 
ok_period
2627
 
9410
2628
 
select period as ok_period from t1 group by ok_period limit 1;
2629
 
ok_period
2630
 
9410
2631
 
select 1+1 as summa from t1 group by summa limit 1;
2632
 
summa
2633
 
2
2634
 
select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1;
2635
 
Nuvarande period
2636
 
9410
2637
 
show tables;
2638
 
Tables_in_test
2639
 
t1
2640
 
t2
2641
 
t3
2642
 
t4
2643
 
show tables from test like "s%";
2644
 
Tables_in_test (s%)
2645
 
show tables from test like "t?";
2646
 
Tables_in_test (t?)
2647
 
show full columns from t2;
2648
 
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
2649
 
auto    int     NULL    NO      PRI     NULL    auto_increment  #       
2650
 
fld1    int     NULL    NO      UNI     NULL            #       
2651
 
companynr       int     NULL    NO              NULL            #       
2652
 
fld3    varchar(30)     utf8_general_ci NO      MUL     NULL            #       
2653
 
fld4    varchar(35)     utf8_general_ci NO              NULL            #       
2654
 
fld5    varchar(35)     utf8_general_ci NO              NULL            #       
2655
 
fld6    varchar(4)      utf8_general_ci NO              NULL            #       
2656
 
show full columns from t2 from test like 'f%';
2657
 
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
2658
 
fld1    int     NULL    NO      UNI     NULL            #       
2659
 
fld3    varchar(30)     utf8_general_ci NO      MUL     NULL            #       
2660
 
fld4    varchar(35)     utf8_general_ci NO              NULL            #       
2661
 
fld5    varchar(35)     utf8_general_ci NO              NULL            #       
2662
 
fld6    varchar(4)      utf8_general_ci NO              NULL            #       
2663
 
show full columns from t2 from test like 's%';
2664
 
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
2665
 
show keys from t2;
2666
 
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
2667
 
t2      0       PRIMARY 1       auto    A       1199    NULL    NULL            BTREE           
2668
 
t2      0       fld1    1       fld1    A       1199    NULL    NULL            BTREE           
2669
 
t2      1       fld3    1       fld3    A       NULL    NULL    NULL            BTREE           
2670
 
drop table t4, t3, t2, t1;
2671
 
CREATE TABLE t1 (
2672
 
cont_nr int NOT NULL auto_increment,
2673
 
ver_nr int NOT NULL default '0',
2674
 
aufnr int NOT NULL default '0',
2675
 
username varchar(50) NOT NULL default '',
2676
 
hdl_nr int NOT NULL default '0',
2677
 
eintrag date NOT NULL default '0000-00-00',
2678
 
st_klasse varchar(40) NOT NULL default '',
2679
 
st_wert varchar(40) NOT NULL default '',
2680
 
st_zusatz varchar(40) NOT NULL default '',
2681
 
st_bemerkung varchar(255) NOT NULL default '',
2682
 
kunden_art varchar(40) NOT NULL default '',
2683
 
mcbs_knr int default NULL,
2684
 
mcbs_aufnr int NOT NULL default '0',
2685
 
schufa_status char(1) default '?',
2686
 
bemerkung text,
2687
 
wirknetz text,
2688
 
wf_igz int NOT NULL default '0',
2689
 
tarifcode varchar(80) default NULL,
2690
 
recycle char(1) default NULL,
2691
 
sim varchar(30) default NULL,
2692
 
mcbs_tpl varchar(30) default NULL,
2693
 
emp_nr int NOT NULL default '0',
2694
 
laufzeit int default NULL,
2695
 
hdl_name varchar(30) default NULL,
2696
 
prov_hdl_nr int NOT NULL default '0',
2697
 
auto_wirknetz varchar(50) default NULL,
2698
 
auto_billing varchar(50) default NULL,
2699
 
touch timestamp NOT NULL,
2700
 
kategorie varchar(50) default NULL,
2701
 
kundentyp varchar(20) NOT NULL default '',
2702
 
sammel_rech_msisdn varchar(30) NOT NULL default '',
2703
 
p_nr varchar(9) NOT NULL default '',
2704
 
suffix char(3) NOT NULL default '',
2705
 
PRIMARY KEY (cont_nr),
2706
 
KEY idx_aufnr(aufnr),
2707
 
KEY idx_hdl_nr(hdl_nr),
2708
 
KEY idx_st_klasse(st_klasse),
2709
 
KEY ver_nr(ver_nr),
2710
 
KEY eintrag_idx(eintrag),
2711
 
KEY emp_nr_idx(emp_nr),
2712
 
KEY wf_igz(wf_igz),
2713
 
KEY touch(touch),
2714
 
KEY hdl_tag(eintrag,hdl_nr),
2715
 
KEY prov_hdl_nr(prov_hdl_nr),
2716
 
KEY mcbs_aufnr(mcbs_aufnr),
2717
 
KEY kundentyp(kundentyp),
2718
 
KEY p_nr(p_nr,suffix)
2719
 
) ENGINE=MyISAM;
2720
 
INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
2721
 
INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
2722
 
INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
2723
 
INSERT INTO t1 VALUES (3359359,468,3359359,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
2724
 
INSERT INTO t1 VALUES (3359360,0,0,'Mustermann Musterfrau',29674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2',20,NULL,'POS',29674907,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007');
2725
 
INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
2726
 
INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
2727
 
SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie;
2728
 
Kundentyp       kategorie
2729
 
Privat (Private Nutzung)        Mobilfunk
2730
 
Warnings:
2731
 
Warning 1052    Column 'kundentyp' in group statement is ambiguous
2732
 
drop table t1;