1SHOW STATUS LIKE 'Compression'; 2Variable_name Value 3Compression ON 4select * from information_schema.session_status where variable_name= 'COMPRESSION'; 5VARIABLE_NAME VARIABLE_VALUE 6COMPRESSION ON 7drop table if exists t1,t2,t3,t4; 8CREATE TABLE t1 ( 9Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, 10Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL 11); 12INSERT INTO t1 VALUES (9410,9412); 13select period from t1; 14period 159410 16select * from t1; 17Period Varor_period 189410 9412 19select t1.* from t1; 20Period Varor_period 219410 9412 22CREATE TABLE t2 ( 23auto int not null auto_increment, 24fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, 25companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, 26fld3 char(30) DEFAULT '' NOT NULL, 27fld4 char(35) DEFAULT '' NOT NULL, 28fld5 char(35) DEFAULT '' NOT NULL, 29fld6 char(4) DEFAULT '' NOT NULL, 30UNIQUE fld1 (fld1), 31KEY fld3 (fld3), 32PRIMARY KEY (auto) 33); 34select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; 35fld3 36imaginable 37select fld3 from t2 where fld3 like "%cultivation" ; 38fld3 39cultivation 40select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; 41fld3 companynr 42concoct 58 43druggists 58 44engrossing 58 45Eurydice 58 46exclaimers 58 47ferociousness 58 48hopelessness 58 49Huey 58 50imaginable 58 51judges 58 52merging 58 53ostrich 58 54peering 58 55Phelps 58 56presumes 58 57Ruth 58 58sentences 58 59Shylock 58 60straggled 58 61synergy 58 62thanking 58 63tying 58 64unlocks 58 65select fld3,companynr from t2 where companynr = 58 order by fld3; 66fld3 companynr 67concoct 58 68druggists 58 69engrossing 58 70Eurydice 58 71exclaimers 58 72ferociousness 58 73hopelessness 58 74Huey 58 75imaginable 58 76judges 58 77merging 58 78ostrich 58 79peering 58 80Phelps 58 81presumes 58 82Ruth 58 83sentences 58 84Shylock 58 85straggled 58 86synergy 58 87thanking 58 88tying 58 89unlocks 58 90select fld3 from t2 order by fld3 desc limit 10; 91fld3 92youthfulness 93yelped 94Wotan 95workers 96Witt 97witchcraft 98Winsett 99Willy 100willed 101wildcats 102select fld3 from t2 order by fld3 desc limit 5; 103fld3 104youthfulness 105yelped 106Wotan 107workers 108Witt 109select fld3 from t2 order by fld3 desc limit 5,5; 110fld3 111witchcraft 112Winsett 113Willy 114willed 115wildcats 116select t2.fld3 from t2 where fld3 = 'honeysuckle'; 117fld3 118honeysuckle 119select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_'; 120fld3 121honeysuckle 122select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_'; 123fld3 124honeysuckle 125select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%'; 126fld3 127honeysuckle 128select t2.fld3 from t2 where fld3 LIKE 'h%le'; 129fld3 130honeysuckle 131select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_'; 132fld3 133select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%'; 134fld3 135explain select t2.fld3 from t2 where fld3 = 'honeysuckle'; 136id select_type table type possible_keys key key_len ref rows Extra 1371 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index 138explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; 139id select_type table type possible_keys key key_len ref rows Extra 1401 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where 141explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; 142id select_type table type possible_keys key key_len ref rows Extra 1431 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where 144explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; 145id select_type table type possible_keys key key_len ref rows Extra 1461 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index 147explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle'; 148id select_type table type possible_keys key key_len ref rows Extra 1491 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index 150explain select fld3 from t2 ignore index (fld3,not_used); 151ERROR 42000: Key 'not_used' doesn't exist in table 't2' 152explain select fld3 from t2 use index (not_used); 153ERROR 42000: Key 'not_used' doesn't exist in table 't2' 154select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; 155fld3 156honeysuckle 157honoring 158explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; 159id select_type table type possible_keys key key_len ref rows Extra 1601 SIMPLE t2 range fld3 fld3 30 NULL 2 Using where; Using index 161select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; 162fld1 fld3 163148504 Colombo 164068305 Colombo 165000000 nondecreasing 166select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes'; 167fld1 fld3 168232605 appendixes 1691232605 appendixes 1701232606 appendixes 1711232607 appendixes 1721232608 appendixes 1731232609 appendixes 174select fld1 from t2 where fld1=250501 or fld1="250502"; 175fld1 176250501 177250502 178explain select fld1 from t2 where fld1=250501 or fld1="250502"; 179id select_type table type possible_keys key key_len ref rows Extra 1801 SIMPLE t2 range fld1 fld1 4 NULL 2 Using where; Using index 181select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502; 182fld1 183250501 184250502 185250505 186250601 187explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502; 188id select_type table type possible_keys key key_len ref rows Extra 1891 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index 190select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%'; 191fld1 fld3 192012001 flanking 193013602 foldout 194013606 fingerings 195018007 fanatic 196018017 featherweight 197018054 fetters 198018103 flint 199018104 flopping 200036002 funereal 201038017 fetched 202038205 firearm 203058004 Fenton 204088303 feminine 205186002 freakish 206188007 flurried 207188505 fitting 208198006 furthermore 209202301 Fitzpatrick 210208101 fiftieth 211208113 freest 212218008 finishers 213218022 feed 214218401 faithful 215226205 foothill 216226209 furnishings 217228306 forthcoming 218228311 fated 219231315 freezes 220232102 forgivably 221238007 filial 222238008 fixedly 223select fld3 from t2 where fld3 like "L%" and fld3 = "ok"; 224fld3 225select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly"); 226fld3 227Chantilly 228select fld1,fld3 from t2 where fld1 like "25050%"; 229fld1 fld3 230250501 poisoning 231250502 Iraqis 232250503 heaving 233250504 population 234250505 bomb 235select fld1,fld3 from t2 where fld1 like "25050_"; 236fld1 fld3 237250501 poisoning 238250502 Iraqis 239250503 heaving 240250504 population 241250505 bomb 242select distinct companynr from t2; 243companynr 24400 24537 24636 24750 24858 24929 25040 25153 25265 25341 25434 25568 256select distinct companynr from t2 order by companynr; 257companynr 25800 25929 26034 26136 26237 26340 26441 26550 26653 26758 26865 26968 270select distinct companynr from t2 order by companynr desc; 271companynr 27268 27365 27458 27553 27650 27741 27840 27937 28036 28134 28229 28300 284select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; 285fld3 period 286obliterates 9410 287offload 9410 288opaquely 9410 289organizer 9410 290overestimating 9410 291overlay 9410 292select distinct fld3 from t2 where companynr = 34 order by fld3; 293fld3 294absentee 295accessed 296ahead 297alphabetic 298Asiaticizations 299attitude 300aye 301bankruptcies 302belays 303Blythe 304bomb 305boulevard 306bulldozes 307cannot 308caressing 309charcoal 310checksumming 311chess 312clubroom 313colorful 314cosy 315creator 316crying 317Darius 318diffusing 319duality 320Eiffel 321Epiphany 322Ernestine 323explorers 324exterminated 325famine 326forked 327Gershwins 328heaving 329Hodges 330Iraqis 331Italianization 332Lagos 333landslide 334libretto 335Majorca 336mastering 337narrowed 338occurred 339offerers 340Palestine 341Peruvianizes 342pharmaceutic 343poisoning 344population 345Pygmalion 346rats 347realest 348recording 349regimented 350retransmitting 351reviver 352rouses 353scars 354sicker 355sleepwalk 356stopped 357sugars 358translatable 359uncles 360unexpected 361uprisings 362versatility 363vest 364select distinct fld3 from t2 limit 10; 365fld3 366abates 367abiding 368Abraham 369abrogating 370absentee 371abut 372accessed 373accruing 374accumulating 375accuracies 376select distinct fld3 from t2 having fld3 like "A%" limit 10; 377fld3 378abates 379abiding 380Abraham 381abrogating 382absentee 383abut 384accessed 385accruing 386accumulating 387accuracies 388select distinct substring(fld3,1,3) from t2 where fld3 like "A%"; 389substring(fld3,1,3) 390aba 391abi 392Abr 393abs 394abu 395acc 396acq 397acu 398Ade 399adj 400Adl 401adm 402Ado 403ads 404adv 405aer 406aff 407afi 408afl 409afo 410agi 411ahe 412aim 413air 414Ald 415alg 416ali 417all 418alp 419alr 420ama 421ame 422amm 423ana 424and 425ane 426Ang 427ani 428Ann 429Ant 430api 431app 432aqu 433Ara 434arc 435Arm 436arr 437Art 438Asi 439ask 440asp 441ass 442ast 443att 444aud 445Aug 446aut 447ave 448avo 449awe 450aye 451Azt 452select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10; 453a 454aba 455abi 456Abr 457abs 458abu 459acc 460acq 461acu 462Ade 463adj 464select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10; 465substring(fld3,1,3) 466aba 467abi 468Abr 469abs 470abu 471acc 472acq 473acu 474Ade 475adj 476select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10; 477a 478aba 479abi 480Abr 481abs 482abu 483acc 484acq 485acu 486Ade 487adj 488create table t3 ( 489period int not null, 490name char(32) not null, 491companynr int not null, 492price double(11,0), 493price2 double(11,0), 494key (period), 495key (name) 496); 497create temporary table tmp engine = myisam select * from t3; 498insert into t3 select * from tmp; 499insert into tmp select * from t3; 500insert into t3 select * from tmp; 501insert into tmp select * from t3; 502insert into t3 select * from tmp; 503insert into tmp select * from t3; 504insert into t3 select * from tmp; 505insert into tmp select * from t3; 506insert into t3 select * from tmp; 507insert into tmp select * from t3; 508insert into t3 select * from tmp; 509insert into tmp select * from t3; 510insert into t3 select * from tmp; 511insert into tmp select * from t3; 512insert into t3 select * from tmp; 513insert into tmp select * from t3; 514insert into t3 select * from tmp; 515alter table t3 add t2nr int not null auto_increment primary key first; 516drop table tmp; 517SET BIG_TABLES=1; 518select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; 519namn 520Abraham Abraham 521abrogating abrogating 522admonishing admonishing 523Adolph Adolph 524afield afield 525aging aging 526ammonium ammonium 527analyzable analyzable 528animals animals 529animized animized 530SET BIG_TABLES=0; 531select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; 532concat(fld3," ",fld3) 533Abraham Abraham 534abrogating abrogating 535admonishing admonishing 536Adolph Adolph 537afield afield 538aging aging 539ammonium ammonium 540analyzable analyzable 541animals animals 542animized animized 543select distinct fld5 from t2 limit 10; 544fld5 545neat 546Steinberg 547jarring 548tinily 549balled 550persist 551attainments 552fanatic 553measures 554rightfulness 555select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; 556fld3 count(*) 557affixed 1 558and 1 559annoyers 1 560Anthony 1 561assayed 1 562assurers 1 563attendants 1 564bedlam 1 565bedpost 1 566boasted 1 567SET BIG_TABLES=1; 568select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; 569fld3 count(*) 570affixed 1 571and 1 572annoyers 1 573Anthony 1 574assayed 1 575assurers 1 576attendants 1 577bedlam 1 578bedpost 1 579boasted 1 580SET BIG_TABLES=0; 581select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; 582fld3 repeat("a",length(fld3)) count(*) 583circus aaaaaa 1 584cited aaaaa 1 585Colombo aaaaaaa 1 586congresswoman aaaaaaaaaaaaa 1 587contrition aaaaaaaaaa 1 588corny aaaaa 1 589cultivation aaaaaaaaaaa 1 590definiteness aaaaaaaaaaaa 1 591demultiplex aaaaaaaaaaa 1 592disappointing aaaaaaaaaaaaa 1 593select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2; 594companynr rtrim(space(512+companynr)) 59537 59678 597101 598154 599311 600447 601512 602select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3; 603fld3 604explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3; 605id select_type table type possible_keys key key_len ref rows Extra 6061 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort 6071 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index 608explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; 609id select_type table type possible_keys key key_len ref rows Extra 6101 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort 6111 SIMPLE t3 ref period period 4 test.t1.period 4181 NULL 612explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; 613id select_type table type possible_keys key key_len ref rows Extra 6141 SIMPLE t3 index period period 4 NULL 1 NULL 6151 SIMPLE t1 ref period period 4 test.t3.period 4181 NULL 616explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; 617id select_type table type possible_keys key key_len ref rows Extra 6181 SIMPLE t1 index period period 4 NULL 1 NULL 6191 SIMPLE t3 ref period period 4 test.t1.period 4181 NULL 620select period from t1; 621period 6229410 623select period from t1 where period=1900; 624period 625select fld3,period from t1,t2 where fld1 = 011401 order by period; 626fld3 period 627breaking 9410 628select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; 629fld3 period 630breaking 1001 631explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; 632id select_type table type possible_keys key key_len ref rows Extra 6331 SIMPLE t2 const fld1 fld1 4 const 1 NULL 6341 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 NULL 635select fld3,period from t2,t1 where companynr*10 = 37*10; 636fld3 period 637breaking 9410 638Romans 9410 639intercepted 9410 640bewilderingly 9410 641astound 9410 642admonishing 9410 643sumac 9410 644flanking 9410 645combed 9410 646subjective 9410 647scatterbrain 9410 648Eulerian 9410 649Kane 9410 650overlay 9410 651perturb 9410 652goblins 9410 653annihilates 9410 654Wotan 9410 655snatching 9410 656concludes 9410 657laterally 9410 658yelped 9410 659grazing 9410 660Baird 9410 661celery 9410 662misunderstander 9410 663handgun 9410 664foldout 9410 665mystic 9410 666succumbed 9410 667Nabisco 9410 668fingerings 9410 669aging 9410 670afield 9410 671ammonium 9410 672boat 9410 673intelligibility 9410 674Augustine 9410 675teethe 9410 676dreaded 9410 677scholastics 9410 678audiology 9410 679wallet 9410 680parters 9410 681eschew 9410 682quitter 9410 683neat 9410 684Steinberg 9410 685jarring 9410 686tinily 9410 687balled 9410 688persist 9410 689attainments 9410 690fanatic 9410 691measures 9410 692rightfulness 9410 693capably 9410 694impulsive 9410 695starlet 9410 696terminators 9410 697untying 9410 698announces 9410 699featherweight 9410 700pessimist 9410 701daughter 9410 702decliner 9410 703lawgiver 9410 704stated 9410 705readable 9410 706attrition 9410 707cascade 9410 708motors 9410 709interrogate 9410 710pests 9410 711stairway 9410 712dopers 9410 713testicle 9410 714Parsifal 9410 715leavings 9410 716postulation 9410 717squeaking 9410 718contrasted 9410 719leftover 9410 720whiteners 9410 721erases 9410 722Punjab 9410 723Merritt 9410 724Quixotism 9410 725sweetish 9410 726dogging 9410 727scornfully 9410 728bellow 9410 729bills 9410 730cupboard 9410 731sureties 9410 732puddings 9410 733fetters 9410 734bivalves 9410 735incurring 9410 736Adolph 9410 737pithed 9410 738Miles 9410 739trimmings 9410 740tragedies 9410 741skulking 9410 742flint 9410 743flopping 9410 744relaxing 9410 745offload 9410 746suites 9410 747lists 9410 748animized 9410 749multilayer 9410 750standardizes 9410 751Judas 9410 752vacuuming 9410 753dentally 9410 754humanness 9410 755inch 9410 756Weissmuller 9410 757irresponsibly 9410 758luckily 9410 759culled 9410 760medical 9410 761bloodbath 9410 762subschema 9410 763animals 9410 764Micronesia 9410 765repetitions 9410 766Antares 9410 767ventilate 9410 768pityingly 9410 769interdependent 9410 770Graves 9410 771neonatal 9410 772chafe 9410 773honoring 9410 774realtor 9410 775elite 9410 776funereal 9410 777abrogating 9410 778sorters 9410 779Conley 9410 780lectured 9410 781Abraham 9410 782Hawaii 9410 783cage 9410 784hushes 9410 785Simla 9410 786reporters 9410 787Dutchman 9410 788descendants 9410 789groupings 9410 790dissociate 9410 791coexist 9410 792Beebe 9410 793Taoism 9410 794Connally 9410 795fetched 9410 796checkpoints 9410 797rusting 9410 798galling 9410 799obliterates 9410 800traitor 9410 801resumes 9410 802analyzable 9410 803terminator 9410 804gritty 9410 805firearm 9410 806minima 9410 807Selfridge 9410 808disable 9410 809witchcraft 9410 810betroth 9410 811Manhattanize 9410 812imprint 9410 813peeked 9410 814swelling 9410 815interrelationships 9410 816riser 9410 817Gandhian 9410 818peacock 9410 819bee 9410 820kanji 9410 821dental 9410 822scarf 9410 823chasm 9410 824insolence 9410 825syndicate 9410 826alike 9410 827imperial 9410 828convulsion 9410 829railway 9410 830validate 9410 831normalizes 9410 832comprehensive 9410 833chewing 9410 834denizen 9410 835schemer 9410 836chronicle 9410 837Kline 9410 838Anatole 9410 839partridges 9410 840brunch 9410 841recruited 9410 842dimensions 9410 843Chicana 9410 844announced 9410 845praised 9410 846employing 9410 847linear 9410 848quagmire 9410 849western 9410 850relishing 9410 851serving 9410 852scheduling 9410 853lore 9410 854eventful 9410 855arteriole 9410 856disentangle 9410 857cured 9410 858Fenton 9410 859avoidable 9410 860drains 9410 861detectably 9410 862husky 9410 863impelling 9410 864undoes 9410 865evened 9410 866squeezes 9410 867destroyer 9410 868rudeness 9410 869beaner 9410 870boorish 9410 871Everhart 9410 872encompass 9410 873mushrooms 9410 874Alison 9410 875externally 9410 876pellagra 9410 877cult 9410 878creek 9410 879Huffman 9410 880Majorca 9410 881governing 9410 882gadfly 9410 883reassigned 9410 884intentness 9410 885craziness 9410 886psychic 9410 887squabbled 9410 888burlesque 9410 889capped 9410 890extracted 9410 891DiMaggio 9410 892exclamation 9410 893subdirectory 9410 894Gothicism 9410 895feminine 9410 896metaphysically 9410 897sanding 9410 898Miltonism 9410 899freakish 9410 900index 9410 901straight 9410 902flurried 9410 903denotative 9410 904coming 9410 905commencements 9410 906gentleman 9410 907gifted 9410 908Shanghais 9410 909sportswriting 9410 910sloping 9410 911navies 9410 912leaflet 9410 913shooter 9410 914Joplin 9410 915babies 9410 916assails 9410 917admiring 9410 918swaying 9410 919Goldstine 9410 920fitting 9410 921Norwalk 9410 922analogy 9410 923deludes 9410 924cokes 9410 925Clayton 9410 926exhausts 9410 927causality 9410 928sating 9410 929icon 9410 930throttles 9410 931communicants 9410 932dehydrate 9410 933priceless 9410 934publicly 9410 935incidentals 9410 936commonplace 9410 937mumbles 9410 938furthermore 9410 939cautioned 9410 940parametrized 9410 941registration 9410 942sadly 9410 943positioning 9410 944babysitting 9410 945eternal 9410 946hoarder 9410 947congregates 9410 948rains 9410 949workers 9410 950sags 9410 951unplug 9410 952garage 9410 953boulder 9410 954specifics 9410 955Teresa 9410 956Winsett 9410 957convenient 9410 958buckboards 9410 959amenities 9410 960resplendent 9410 961sews 9410 962participated 9410 963Simon 9410 964certificates 9410 965Fitzpatrick 9410 966Evanston 9410 967misted 9410 968textures 9410 969save 9410 970count 9410 971rightful 9410 972chaperone 9410 973Lizzy 9410 974clenched 9410 975effortlessly 9410 976accessed 9410 977beaters 9410 978Hornblower 9410 979vests 9410 980indulgences 9410 981infallibly 9410 982unwilling 9410 983excrete 9410 984spools 9410 985crunches 9410 986overestimating 9410 987ineffective 9410 988humiliation 9410 989sophomore 9410 990star 9410 991rifles 9410 992dialysis 9410 993arriving 9410 994indulge 9410 995clockers 9410 996languages 9410 997Antarctica 9410 998percentage 9410 999ceiling 9410 1000specification 9410 1001regimented 9410 1002ciphers 9410 1003pictures 9410 1004serpents 9410 1005allot 9410 1006realized 9410 1007mayoral 9410 1008opaquely 9410 1009hostess 9410 1010fiftieth 9410 1011incorrectly 9410 1012decomposition 9410 1013stranglings 9410 1014mixture 9410 1015electroencephalography 9410 1016similarities 9410 1017charges 9410 1018freest 9410 1019Greenberg 9410 1020tinting 9410 1021expelled 9410 1022warm 9410 1023smoothed 9410 1024deductions 9410 1025Romano 9410 1026bitterroot 9410 1027corset 9410 1028securing 9410 1029environing 9410 1030cute 9410 1031Crays 9410 1032heiress 9410 1033inform 9410 1034avenge 9410 1035universals 9410 1036Kinsey 9410 1037ravines 9410 1038bestseller 9410 1039equilibrium 9410 1040extents 9410 1041relatively 9410 1042pressure 9410 1043critiques 9410 1044befouled 9410 1045rightfully 9410 1046mechanizing 9410 1047Latinizes 9410 1048timesharing 9410 1049Aden 9410 1050embassies 9410 1051males 9410 1052shapelessly 9410 1053mastering 9410 1054Newtonian 9410 1055finishers 9410 1056abates 9410 1057teem 9410 1058kiting 9410 1059stodgy 9410 1060feed 9410 1061guitars 9410 1062airships 9410 1063store 9410 1064denounces 9410 1065Pyle 9410 1066Saxony 9410 1067serializations 9410 1068Peruvian 9410 1069taxonomically 9410 1070kingdom 9410 1071stint 9410 1072Sault 9410 1073faithful 9410 1074Ganymede 9410 1075tidiness 9410 1076gainful 9410 1077contrary 9410 1078Tipperary 9410 1079tropics 9410 1080theorizers 9410 1081renew 9410 1082already 9410 1083terminal 9410 1084Hegelian 9410 1085hypothesizer 9410 1086warningly 9410 1087journalizing 9410 1088nested 9410 1089Lars 9410 1090saplings 9410 1091foothill 9410 1092labeled 9410 1093imperiously 9410 1094reporters 9410 1095furnishings 9410 1096precipitable 9410 1097discounts 9410 1098excises 9410 1099Stalin 9410 1100despot 9410 1101ripeness 9410 1102Arabia 9410 1103unruly 9410 1104mournfulness 9410 1105boom 9410 1106slaughter 9410 1107Sabine 9410 1108handy 9410 1109rural 9410 1110organizer 9410 1111shipyard 9410 1112civics 9410 1113inaccuracy 9410 1114rules 9410 1115juveniles 9410 1116comprised 9410 1117investigations 9410 1118stabilizes 9410 1119seminaries 9410 1120Hunter 9410 1121sporty 9410 1122test 9410 1123weasels 9410 1124CERN 9410 1125tempering 9410 1126afore 9410 1127Galatean 9410 1128techniques 9410 1129error 9410 1130veranda 9410 1131severely 9410 1132Cassites 9410 1133forthcoming 9410 1134guides 9410 1135vanish 9410 1136lied 9410 1137sawtooth 9410 1138fated 9410 1139gradually 9410 1140widens 9410 1141preclude 9410 1142evenhandedly 9410 1143percentage 9410 1144disobedience 9410 1145humility 9410 1146gleaning 9410 1147petted 9410 1148bloater 9410 1149minion 9410 1150marginal 9410 1151apiary 9410 1152measures 9410 1153precaution 9410 1154repelled 9410 1155primary 9410 1156coverings 9410 1157Artemia 9410 1158navigate 9410 1159spatial 9410 1160Gurkha 9410 1161meanwhile 9410 1162Melinda 9410 1163Butterfield 9410 1164Aldrich 9410 1165previewing 9410 1166glut 9410 1167unaffected 9410 1168inmate 9410 1169mineral 9410 1170impending 9410 1171meditation 9410 1172ideas 9410 1173miniaturizes 9410 1174lewdly 9410 1175title 9410 1176youthfulness 9410 1177creak 9410 1178Chippewa 9410 1179clamored 9410 1180freezes 9410 1181forgivably 9410 1182reduce 9410 1183McGovern 9410 1184Nazis 9410 1185epistle 9410 1186socializes 9410 1187conceptions 9410 1188Kevin 9410 1189uncovering 9410 1190chews 9410 1191appendixes 9410 1192appendixes 9410 1193appendixes 9410 1194appendixes 9410 1195appendixes 9410 1196appendixes 9410 1197raining 9410 1198infest 9410 1199compartment 9410 1200minting 9410 1201ducks 9410 1202roped 9410 1203waltz 9410 1204Lillian 9410 1205repressions 9410 1206chillingly 9410 1207noncritical 9410 1208lithograph 9410 1209spongers 9410 1210parenthood 9410 1211posed 9410 1212instruments 9410 1213filial 9410 1214fixedly 9410 1215relives 9410 1216Pandora 9410 1217watering 9410 1218ungrateful 9410 1219secures 9410 1220poison 9410 1221dusted 9410 1222encompasses 9410 1223presentation 9410 1224Kantian 9410 1225select 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; 1226fld3 period price price2 1227admonishing 1002 28357832 8723648 1228analyzable 1002 28357832 8723648 1229annihilates 1001 5987435 234724 1230Antares 1002 28357832 8723648 1231astound 1001 5987435 234724 1232audiology 1001 5987435 234724 1233Augustine 1002 28357832 8723648 1234Baird 1002 28357832 8723648 1235bewilderingly 1001 5987435 234724 1236breaking 1001 5987435 234724 1237Conley 1001 5987435 234724 1238dentally 1002 28357832 8723648 1239dissociate 1002 28357832 8723648 1240elite 1001 5987435 234724 1241eschew 1001 5987435 234724 1242Eulerian 1001 5987435 234724 1243flanking 1001 5987435 234724 1244foldout 1002 28357832 8723648 1245funereal 1002 28357832 8723648 1246galling 1002 28357832 8723648 1247Graves 1001 5987435 234724 1248grazing 1001 5987435 234724 1249groupings 1001 5987435 234724 1250handgun 1001 5987435 234724 1251humility 1002 28357832 8723648 1252impulsive 1002 28357832 8723648 1253inch 1001 5987435 234724 1254intelligibility 1001 5987435 234724 1255jarring 1001 5987435 234724 1256lawgiver 1001 5987435 234724 1257lectured 1002 28357832 8723648 1258Merritt 1002 28357832 8723648 1259neonatal 1001 5987435 234724 1260offload 1002 28357832 8723648 1261parters 1002 28357832 8723648 1262pityingly 1002 28357832 8723648 1263puddings 1002 28357832 8723648 1264Punjab 1001 5987435 234724 1265quitter 1002 28357832 8723648 1266realtor 1001 5987435 234724 1267relaxing 1001 5987435 234724 1268repetitions 1001 5987435 234724 1269resumes 1001 5987435 234724 1270Romans 1002 28357832 8723648 1271rusting 1001 5987435 234724 1272scholastics 1001 5987435 234724 1273skulking 1002 28357832 8723648 1274stated 1002 28357832 8723648 1275suites 1002 28357832 8723648 1276sureties 1001 5987435 234724 1277testicle 1002 28357832 8723648 1278tinily 1002 28357832 8723648 1279tragedies 1001 5987435 234724 1280trimmings 1001 5987435 234724 1281vacuuming 1001 5987435 234724 1282ventilate 1001 5987435 234724 1283wallet 1001 5987435 234724 1284Weissmuller 1002 28357832 8723648 1285Wotan 1002 28357832 8723648 1286select 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; 1287fld1 fld3 period price price2 1288018201 relaxing 1001 5987435 234724 1289018601 vacuuming 1001 5987435 234724 1290018801 inch 1001 5987435 234724 1291018811 repetitions 1001 5987435 234724 1292create table t4 ( 1293companynr tinyint(2) unsigned zerofill NOT NULL default '00', 1294companyname char(30) NOT NULL default '', 1295PRIMARY KEY (companynr), 1296UNIQUE KEY companyname(companyname) 1297) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames'; 1298select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr; 1299companynr companyname 130000 Unknown 130129 company 1 130234 company 2 130336 company 3 130437 company 4 130540 company 5 130641 company 6 130750 company 11 130853 company 7 130958 company 8 131065 company 9 131168 company 10 1312select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr; 1313companynr companyname 131400 Unknown 131529 company 1 131634 company 2 131736 company 3 131837 company 4 131940 company 5 132041 company 6 132150 company 11 132253 company 7 132358 company 8 132465 company 9 132568 company 10 1326select * from t1,t1 t12; 1327Period Varor_period Period Varor_period 13289410 9412 9410 9412 1329select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; 1330fld1 fld1 1331250501 250501 1332250502 250501 1333250503 250501 1334250504 250501 1335250505 250501 1336250501 250502 1337250502 250502 1338250503 250502 1339250504 250502 1340250505 250502 1341250501 250503 1342250502 250503 1343250503 250503 1344250504 250503 1345250505 250503 1346250501 250504 1347250502 250504 1348250503 250504 1349250504 250504 1350250505 250504 1351250501 250505 1352250502 250505 1353250503 250505 1354250504 250505 1355250505 250505 1356insert into t2 (fld1, companynr) values (999999,99); 1357select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null; 1358companynr companyname 135999 NULL 1360select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null; 1361count(*) 13621199 1363explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null; 1364id select_type table type possible_keys key key_len ref rows Extra 13651 SIMPLE t2 ALL NULL NULL NULL NULL 1200 NULL 13661 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists 1367explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null; 1368id select_type table type possible_keys key key_len ref rows Extra 13691 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL 13701 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists; Using join buffer (Block Nested Loop) 1371select companynr,companyname from t2 left join t4 using (companynr) where companynr is null; 1372companynr companyname 1373select count(*) from t2 left join t4 using (companynr) where companynr is not null; 1374count(*) 13751200 1376explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null; 1377id select_type table type possible_keys key key_len ref rows Extra 13781 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 1379explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null; 1380id select_type table type possible_keys key key_len ref rows Extra 13811 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 1382delete from t2 where fld1=999999; 1383explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; 1384id select_type table type possible_keys key key_len ref rows Extra 13851 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where 13861 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL 1387explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; 1388id select_type table type possible_keys key key_len ref rows Extra 13891 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where 13901 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL 1391explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; 1392id select_type table type possible_keys key key_len ref rows Extra 13931 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where 13941 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 NULL 1395explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; 1396id select_type table type possible_keys key key_len ref rows Extra 13971 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where 13981 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1399explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; 1400id select_type table type possible_keys key key_len ref rows Extra 14011 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where 14021 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1403explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; 1404id select_type table type possible_keys key key_len ref rows Extra 14051 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where 14061 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1407explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; 1408id select_type table type possible_keys key key_len ref rows Extra 14091 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL 14101 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1411explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; 1412id select_type table type possible_keys key key_len ref rows Extra 14131 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 NULL 14141 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1415explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; 1416id select_type table type possible_keys key key_len ref rows Extra 14171 SIMPLE t4 ALL NULL NULL NULL NULL 12 NULL 14181 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1419explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; 1420id select_type table type possible_keys key key_len ref rows Extra 14211 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where 14221 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1423explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; 1424id select_type table type possible_keys key key_len ref rows Extra 14251 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where 14261 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1427explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; 1428id select_type table type possible_keys key key_len ref rows Extra 14291 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where 14301 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1431select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; 1432companynr companynr 143337 36 143441 40 1435explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; 1436id select_type table type possible_keys key key_len ref rows Extra 14371 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary 14381 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (Block Nested Loop) 1439select 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; 1440fld1 companynr fld3 period 1441038008 37 reporters 1008 1442038208 37 Selfridge 1008 1443select 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; 1444fld1 companynr fld3 period 1445038008 37 reporters 1008 1446038208 37 Selfridge 1008 1447select 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; 1448fld1 companynr fld3 period 1449038008 37 reporters 1008 1450038208 37 Selfridge 1008 1451select 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); 1452period 14539410 1454select 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))); 1455period 14569410 1457select 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; 1458fld1 1459250501 1460250502 1461250503 1462250505 1463select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606); 1464fld1 1465250502 1466250503 1467select fld1 from t2 where fld1 between 250502 and 250504; 1468fld1 1469250502 1470250503 1471250504 1472select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ; 1473fld3 1474label 1475labeled 1476labeled 1477landslide 1478laterally 1479leaflet 1480lewdly 1481Lillian 1482luckily 1483select count(*) from t1; 1484count(*) 14851 1486select companynr,count(*),sum(fld1) from t2 group by companynr; 1487companynr count(*) sum(fld1) 148800 82 10355753 148929 95 14473298 149034 70 17788966 149136 215 22786296 149237 588 83602098 149340 37 6618386 149441 52 12816335 149550 11 1595438 149653 4 793210 149758 23 2254293 149865 10 2284055 149968 12 3097288 1500select companynr,count(*) from t2 group by companynr order by companynr desc limit 5; 1501companynr count(*) 150268 12 150365 10 150458 23 150553 4 150650 11 1507select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; 1508count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 150970 absentee vest 17788966 254128.0857 3272.5939722090234 10709871.306938833 1510explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; 1511id select_type table type possible_keys key key_len ref rows filtered Extra 15121 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where 1513Warnings: 1514Note 1003 /* select#1 */ 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` <> '')) 1515select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; 1516companynr count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 151700 82 Anthony windmills 10355753 126289.6707 115550.97568479746 13352027981.708656 151829 95 abut wetness 14473298 152350.5053 8368.547956641249 70032594.90260443 151934 70 absentee vest 17788966 254128.0857 3272.5939722090234 10709871.306938833 1520select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10; 1521companynr t2nr count(price) sum(price) min(price) max(price) avg(price) 152237 1 1 5987435 5987435 5987435 5987435.0000 152337 2 1 28357832 28357832 28357832 28357832.0000 152437 3 1 39654943 39654943 39654943 39654943.0000 152537 11 1 5987435 5987435 5987435 5987435.0000 152637 12 1 28357832 28357832 28357832 28357832.0000 152737 13 1 39654943 39654943 39654943 39654943.0000 152837 21 1 5987435 5987435 5987435 5987435.0000 152937 22 1 28357832 28357832 28357832 28357832.0000 153037 23 1 39654943 39654943 39654943 39654943.0000 153137 31 1 5987435 5987435 5987435 5987435.0000 1532select /*! 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; 1533companynr t2nr count(price) sum(price) min(price) max(price) avg(price) 153437 1 1 5987435 5987435 5987435 5987435.0000 153537 2 1 28357832 28357832 28357832 28357832.0000 153637 3 1 39654943 39654943 39654943 39654943.0000 153737 11 1 5987435 5987435 5987435 5987435.0000 153837 12 1 28357832 28357832 28357832 28357832.0000 153937 13 1 39654943 39654943 39654943 39654943.0000 154037 21 1 5987435 5987435 5987435 5987435.0000 154137 22 1 28357832 28357832 28357832 28357832.0000 154237 23 1 39654943 39654943 39654943 39654943.0000 154337 31 1 5987435 5987435 5987435 5987435.0000 1544select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ; 1545companynr count(price) sum(price) min(price) max(price) avg(price) 154637 12543 309394878010 5987435 39654943 24666736.6667 154778 8362 414611089292 726498 98439034 49582766.0000 1548101 4181 3489454238 834598 834598 834598.0000 1549154 4181 4112197254950 983543950 983543950 983543950.0000 1550311 4181 979599938 234298 234298 234298.0000 1551447 4181 9929180954 2374834 2374834 2374834.0000 1552512 4181 3288532102 786542 786542 786542.0000 1553select distinct mod(companynr,10) from t4 group by companynr; 1554mod(companynr,10) 15550 15569 15574 15586 15597 15601 15613 15628 15635 1564select distinct 1 from t4 group by companynr; 15651 15661 1567select count(distinct fld1) from t2; 1568count(distinct fld1) 15691199 1570select companynr,count(distinct fld1) from t2 group by companynr; 1571companynr count(distinct fld1) 157200 82 157329 95 157434 70 157536 215 157637 588 157740 37 157841 52 157950 11 158053 4 158158 23 158265 10 158368 12 1584select companynr,count(*) from t2 group by companynr; 1585companynr count(*) 158600 82 158729 95 158834 70 158936 215 159037 588 159140 37 159241 52 159350 11 159453 4 159558 23 159665 10 159768 12 1598select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr; 1599companynr count(distinct concat(fld1,repeat(65,1000))) 160000 82 160129 95 160234 70 160336 215 160437 588 160540 37 160641 52 160750 11 160853 4 160958 23 161065 10 161168 12 1612select companynr,count(distinct concat(fld1,repeat(65,200))) from t2 group by companynr; 1613companynr count(distinct concat(fld1,repeat(65,200))) 161400 82 161529 95 161634 70 161736 215 161837 588 161940 37 162041 52 162150 11 162253 4 162358 23 162465 10 162568 12 1626select companynr,count(distinct floor(fld1/100)) from t2 group by companynr; 1627companynr count(distinct floor(fld1/100)) 162800 47 162929 35 163034 14 163136 69 163237 108 163340 16 163441 11 163550 9 163653 1 163758 1 163865 1 163968 1 1640select companynr,count(distinct concat(repeat(65,1000),floor(fld1/100))) from t2 group by companynr; 1641companynr count(distinct concat(repeat(65,1000),floor(fld1/100))) 164200 47 164329 35 164434 14 164536 69 164637 108 164740 16 164841 11 164950 9 165053 1 165158 1 165265 1 165368 1 1654select sum(fld1),fld3 from t2 where fld3="Romans" group by fld1 limit 10; 1655sum(fld1) fld3 165611402 Romans 1657select name,count(*) from t3 where name='cloakroom' group by name; 1658name count(*) 1659cloakroom 4181 1660select name,count(*) from t3 where name='cloakroom' and price>10 group by name; 1661name count(*) 1662cloakroom 4181 1663select count(*) from t3 where name='cloakroom' and price2=823742; 1664count(*) 16654181 1666select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name; 1667name count(*) 1668cloakroom 4181 1669select name,count(*) from t3 where name >= "extramarital" and price <= 39654943 group by name; 1670name count(*) 1671extramarital 4181 1672gazer 4181 1673gems 4181 1674Iranizes 4181 1675spates 4181 1676tucked 4181 1677violinist 4181 1678select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; 1679fld3 count(*) 1680spates 4181 1681select companynr|0,companyname from t4 group by 1; 1682companynr|0 companyname 16830 Unknown 168429 company 1 168534 company 2 168636 company 3 168737 company 4 168840 company 5 168941 company 6 169050 company 11 169153 company 7 169258 company 8 169365 company 9 169468 company 10 1695select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by t2.companynr order by companyname; 1696companynr companyname count(*) 169729 company 1 95 169868 company 10 12 169950 company 11 11 170034 company 2 70 170136 company 3 215 170237 company 4 588 170340 company 5 37 170441 company 6 52 170553 company 7 4 170658 company 8 23 170765 company 9 10 170800 Unknown 82 1709select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; 1710fld1 count(*) 1711158402 4181 1712select sum(Period)/count(*) from t1; 1713sum(Period)/count(*) 17149410.0000 1715select 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; 1716companynr count sum diff func 171737 12543 309394878010 0.0000 464091 171878 8362 414611089292 0.0000 652236 1719101 4181 3489454238 0.0000 422281 1720154 4181 4112197254950 0.0000 643874 1721311 4181 979599938 0.0000 1300291 1722447 4181 9929180954 0.0000 1868907 1723512 4181 3288532102 0.0000 2140672 1724select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg; 1725companynr avg 1726154 983543950.0000 1727select companynr,count(*) from t2 group by companynr order by 2 desc; 1728companynr count(*) 172937 588 173036 215 173129 95 173200 82 173334 70 173441 52 173540 37 173658 23 173768 12 173850 11 173965 10 174053 4 1741select companynr,count(*) from t2 where companynr > 40 group by companynr order by 2 desc; 1742companynr count(*) 174341 52 174458 23 174568 12 174650 11 174765 10 174853 4 1749select 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; 1750fld4 fld1 count(price) sum(price) min(price) max(price) avg(price) 1751teethe 000001 1 5987435 5987435 5987435 5987435.0000 1752dreaded 011401 1 5987435 5987435 5987435 5987435.0000 1753scholastics 011402 1 28357832 28357832 28357832 28357832.0000 1754audiology 011403 1 39654943 39654943 39654943 39654943.0000 1755wallet 011501 1 5987435 5987435 5987435 5987435.0000 1756parters 011701 1 5987435 5987435 5987435 5987435.0000 1757eschew 011702 1 28357832 28357832 28357832 28357832.0000 1758quitter 011703 1 39654943 39654943 39654943 39654943.0000 1759neat 012001 1 5987435 5987435 5987435 5987435.0000 1760Steinberg 012003 1 39654943 39654943 39654943 39654943.0000 1761balled 012301 1 5987435 5987435 5987435 5987435.0000 1762persist 012302 1 28357832 28357832 28357832 28357832.0000 1763attainments 012303 1 39654943 39654943 39654943 39654943.0000 1764capably 012501 1 5987435 5987435 5987435 5987435.0000 1765impulsive 012602 1 28357832 28357832 28357832 28357832.0000 1766starlet 012603 1 39654943 39654943 39654943 39654943.0000 1767featherweight 012701 1 5987435 5987435 5987435 5987435.0000 1768pessimist 012702 1 28357832 28357832 28357832 28357832.0000 1769daughter 012703 1 39654943 39654943 39654943 39654943.0000 1770lawgiver 013601 1 5987435 5987435 5987435 5987435.0000 1771stated 013602 1 28357832 28357832 28357832 28357832.0000 1772readable 013603 1 39654943 39654943 39654943 39654943.0000 1773testicle 013801 1 5987435 5987435 5987435 5987435.0000 1774Parsifal 013802 1 28357832 28357832 28357832 28357832.0000 1775leavings 013803 1 39654943 39654943 39654943 39654943.0000 1776squeaking 013901 1 5987435 5987435 5987435 5987435.0000 1777contrasted 016001 1 5987435 5987435 5987435 5987435.0000 1778leftover 016201 1 5987435 5987435 5987435 5987435.0000 1779whiteners 016202 1 28357832 28357832 28357832 28357832.0000 1780erases 016301 1 5987435 5987435 5987435 5987435.0000 1781Punjab 016302 1 28357832 28357832 28357832 28357832.0000 1782Merritt 016303 1 39654943 39654943 39654943 39654943.0000 1783sweetish 018001 1 5987435 5987435 5987435 5987435.0000 1784dogging 018002 1 28357832 28357832 28357832 28357832.0000 1785scornfully 018003 1 39654943 39654943 39654943 39654943.0000 1786fetters 018012 1 28357832 28357832 28357832 28357832.0000 1787bivalves 018013 1 39654943 39654943 39654943 39654943.0000 1788skulking 018021 1 5987435 5987435 5987435 5987435.0000 1789flint 018022 1 28357832 28357832 28357832 28357832.0000 1790flopping 018023 1 39654943 39654943 39654943 39654943.0000 1791Judas 018032 1 28357832 28357832 28357832 28357832.0000 1792vacuuming 018033 1 39654943 39654943 39654943 39654943.0000 1793medical 018041 1 5987435 5987435 5987435 5987435.0000 1794bloodbath 018042 1 28357832 28357832 28357832 28357832.0000 1795subschema 018043 1 39654943 39654943 39654943 39654943.0000 1796interdependent 018051 1 5987435 5987435 5987435 5987435.0000 1797Graves 018052 1 28357832 28357832 28357832 28357832.0000 1798neonatal 018053 1 39654943 39654943 39654943 39654943.0000 1799sorters 018061 1 5987435 5987435 5987435 5987435.0000 1800epistle 018062 1 28357832 28357832 28357832 28357832.0000 1801Conley 018101 1 5987435 5987435 5987435 5987435.0000 1802lectured 018102 1 28357832 28357832 28357832 28357832.0000 1803Abraham 018103 1 39654943 39654943 39654943 39654943.0000 1804cage 018201 1 5987435 5987435 5987435 5987435.0000 1805hushes 018202 1 28357832 28357832 28357832 28357832.0000 1806Simla 018402 1 28357832 28357832 28357832 28357832.0000 1807reporters 018403 1 39654943 39654943 39654943 39654943.0000 1808coexist 018601 1 5987435 5987435 5987435 5987435.0000 1809Beebe 018602 1 28357832 28357832 28357832 28357832.0000 1810Taoism 018603 1 39654943 39654943 39654943 39654943.0000 1811Connally 018801 1 5987435 5987435 5987435 5987435.0000 1812fetched 018802 1 28357832 28357832 28357832 28357832.0000 1813checkpoints 018803 1 39654943 39654943 39654943 39654943.0000 1814gritty 018811 1 5987435 5987435 5987435 5987435.0000 1815firearm 018812 1 28357832 28357832 28357832 28357832.0000 1816minima 019101 1 5987435 5987435 5987435 5987435.0000 1817Selfridge 019102 1 28357832 28357832 28357832 28357832.0000 1818disable 019103 1 39654943 39654943 39654943 39654943.0000 1819witchcraft 019201 1 5987435 5987435 5987435 5987435.0000 1820betroth 030501 1 5987435 5987435 5987435 5987435.0000 1821Manhattanize 030502 1 28357832 28357832 28357832 28357832.0000 1822imprint 030503 1 39654943 39654943 39654943 39654943.0000 1823swelling 031901 1 5987435 5987435 5987435 5987435.0000 1824interrelationships 036001 1 5987435 5987435 5987435 5987435.0000 1825riser 036002 1 28357832 28357832 28357832 28357832.0000 1826bee 038001 1 5987435 5987435 5987435 5987435.0000 1827kanji 038002 1 28357832 28357832 28357832 28357832.0000 1828dental 038003 1 39654943 39654943 39654943 39654943.0000 1829railway 038011 1 5987435 5987435 5987435 5987435.0000 1830validate 038012 1 28357832 28357832 28357832 28357832.0000 1831normalizes 038013 1 39654943 39654943 39654943 39654943.0000 1832Kline 038101 1 5987435 5987435 5987435 5987435.0000 1833Anatole 038102 1 28357832 28357832 28357832 28357832.0000 1834partridges 038103 1 39654943 39654943 39654943 39654943.0000 1835recruited 038201 1 5987435 5987435 5987435 5987435.0000 1836dimensions 038202 1 28357832 28357832 28357832 28357832.0000 1837Chicana 038203 1 39654943 39654943 39654943 39654943.0000 1838select t3.companynr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 group by companynr,fld3; 1839companynr fld3 sum(price) 1840512 boat 786542 1841512 capably 786542 1842512 cupboard 786542 1843512 decliner 786542 1844512 descendants 786542 1845512 dopers 786542 1846512 erases 786542 1847512 Micronesia 786542 1848512 Miles 786542 1849512 skies 786542 1850select 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; 1851companynr count(*) min(fld3) max(fld3) sum(price) avg(price) 185200 1 Omaha Omaha 5987435 5987435.0000 185336 1 dubbed dubbed 28357832 28357832.0000 185437 83 Abraham Wotan 1908978016 22999735.1325 185550 2 scribbled tapestry 68012775 34006387.5000 1856select 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; 1857t3.companynr+0 t2nr fld3 sum(price) 185837 1 Omaha 5987435 185937 11401 breaking 5987435 186037 11402 Romans 28357832 186137 11403 intercepted 39654943 186237 11501 bewilderingly 5987435 186337 11701 astound 5987435 186437 11702 admonishing 28357832 186537 11703 sumac 39654943 186637 12001 flanking 5987435 186737 12003 combed 39654943 186837 12301 Eulerian 5987435 186937 12302 dubbed 28357832 187037 12303 Kane 39654943 187137 12501 annihilates 5987435 187237 12602 Wotan 28357832 187337 12603 snatching 39654943 187437 12701 grazing 5987435 187537 12702 Baird 28357832 187637 12703 celery 39654943 187737 13601 handgun 5987435 187837 13602 foldout 28357832 187937 13603 mystic 39654943 188037 13801 intelligibility 5987435 188137 13802 Augustine 28357832 188237 13803 teethe 39654943 188337 13901 scholastics 5987435 188437 16001 audiology 5987435 188537 16201 wallet 5987435 188637 16202 parters 28357832 188737 16301 eschew 5987435 188837 16302 quitter 28357832 188937 16303 neat 39654943 189037 18001 jarring 5987435 189137 18002 tinily 28357832 189237 18003 balled 39654943 189337 18012 impulsive 28357832 189437 18013 starlet 39654943 189537 18021 lawgiver 5987435 189637 18022 stated 28357832 189737 18023 readable 39654943 189837 18032 testicle 28357832 189937 18033 Parsifal 39654943 190037 18041 Punjab 5987435 190137 18042 Merritt 28357832 190237 18043 Quixotism 39654943 190337 18051 sureties 5987435 190437 18052 puddings 28357832 190537 18053 tapestry 39654943 190637 18061 trimmings 5987435 190737 18062 humility 28357832 190837 18101 tragedies 5987435 190937 18102 skulking 28357832 191037 18103 flint 39654943 191137 18201 relaxing 5987435 191237 18202 offload 28357832 191337 18402 suites 28357832 191437 18403 lists 39654943 191537 18601 vacuuming 5987435 191637 18602 dentally 28357832 191737 18603 humanness 39654943 191837 18801 inch 5987435 191937 18802 Weissmuller 28357832 192037 18803 irresponsibly 39654943 192137 18811 repetitions 5987435 192237 18812 Antares 28357832 192337 19101 ventilate 5987435 192437 19102 pityingly 28357832 192537 19103 interdependent 39654943 192637 19201 Graves 5987435 192737 30501 neonatal 5987435 192837 30502 scribbled 28357832 192937 30503 chafe 39654943 193037 31901 realtor 5987435 193137 36001 elite 5987435 193237 36002 funereal 28357832 193337 38001 Conley 5987435 193437 38002 lectured 28357832 193537 38003 Abraham 39654943 193637 38011 groupings 5987435 193737 38012 dissociate 28357832 193837 38013 coexist 39654943 193937 38101 rusting 5987435 194037 38102 galling 28357832 194137 38103 obliterates 39654943 194237 38201 resumes 5987435 194337 38202 analyzable 28357832 194437 38203 terminator 39654943 1945select 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; 1946sum(price) 1947234298 1948select 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; 1949fld1 sum(price) 1950038008 234298 1951explain select fld3 from t2 where 1>2 or 2>3; 1952id select_type table type possible_keys key key_len ref rows Extra 19531 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 1954explain select fld3 from t2 where fld1=fld1; 1955id select_type table type possible_keys key key_len ref rows Extra 19561 SIMPLE t2 ALL NULL NULL NULL NULL 1199 NULL 1957select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; 1958companynr fld1 195934 250501 196034 250502 1961select companynr,fld1 from t2 WHERE fld1>=250501 HAVING fld1<=250502; 1962companynr fld1 196334 250501 196434 250502 1965select companynr,count(*) as count,sum(fld1) as sum from t2 group by companynr having count > 40 and sum/count >= 120000; 1966companynr count sum 196700 82 10355753 196829 95 14473298 196934 70 17788966 197037 588 83602098 197141 52 12816335 1972select companynr from t2 group by companynr having count(*) > 40 and sum(fld1)/count(*) >= 120000 ; 1973companynr 197400 197529 197634 197737 197841 1979select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by companyname having t2.companynr >= 40; 1980companynr companyname count(*) 198168 company 10 12 198250 company 11 11 198340 company 5 37 198441 company 6 52 198553 company 7 4 198658 company 8 23 198765 company 9 10 1988select count(*) from t2; 1989count(*) 19901199 1991select count(*) from t2 where fld1 < 098024; 1992count(*) 1993387 1994select min(fld1) from t2 where fld1>= 098024; 1995min(fld1) 199698024 1997select max(fld1) from t2 where fld1>= 098024; 1998max(fld1) 19991232609 2000select count(*) from t3 where price2=76234234; 2001count(*) 20024181 2003select count(*) from t3 where companynr=512 and price2=76234234; 2004count(*) 20054181 2006explain select min(fld1),max(fld1),count(*) from t2; 2007id select_type table type possible_keys key key_len ref rows Extra 20081 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away 2009select min(fld1),max(fld1),count(*) from t2; 2010min(fld1) max(fld1) count(*) 20110 1232609 1199 2012select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742; 2013min(t2nr) max(t2nr) 20142115 2115 2015select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78; 2016count(*) min(t2nr) max(t2nr) 20174181 4 41804 2018select t2nr,count(*) from t3 where name='gems' group by t2nr limit 20; 2019t2nr count(*) 20209 1 202119 1 202229 1 202339 1 202449 1 202559 1 202669 1 202779 1 202889 1 202999 1 2030109 1 2031119 1 2032129 1 2033139 1 2034149 1 2035159 1 2036169 1 2037179 1 2038189 1 2039199 1 2040select max(t2nr) from t3 where price=983543950; 2041max(t2nr) 204241807 2043select t1.period from t3 = t1 limit 1; 2044period 20451001 2046select t1.period from t1 as t1 limit 1; 2047period 20489410 2049select t1.period as "Nuvarande period" from t1 as t1 limit 1; 2050Nuvarande period 20519410 2052select period as ok_period from t1 limit 1; 2053ok_period 20549410 2055select period as ok_period from t1 group by ok_period limit 1; 2056ok_period 20579410 2058select 1+1 as summa from t1 group by summa limit 1; 2059summa 20602 2061select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; 2062Nuvarande period 20639410 2064show tables; 2065Tables_in_test 2066t1 2067t2 2068t3 2069t4 2070show tables from test like "s%"; 2071Tables_in_test (s%) 2072show tables from test like "t?"; 2073Tables_in_test (t?) 2074show full columns from t2; 2075Field Type Collation Null Key Default Extra Privileges Comment 2076auto int(11) NULL NO PRI NULL auto_increment # 2077fld1 int(6) unsigned zerofill NULL NO UNI 000000 # 2078companynr tinyint(2) unsigned zerofill NULL NO 00 # 2079fld3 char(30) latin1_swedish_ci NO MUL # 2080fld4 char(35) latin1_swedish_ci NO # 2081fld5 char(35) latin1_swedish_ci NO # 2082fld6 char(4) latin1_swedish_ci NO # 2083show full columns from t2 from test like 'f%'; 2084Field Type Collation Null Key Default Extra Privileges Comment 2085fld1 int(6) unsigned zerofill NULL NO UNI 000000 # 2086fld3 char(30) latin1_swedish_ci NO MUL # 2087fld4 char(35) latin1_swedish_ci NO # 2088fld5 char(35) latin1_swedish_ci NO # 2089fld6 char(4) latin1_swedish_ci NO # 2090show full columns from t2 from test like 's%'; 2091Field Type Collation Null Key Default Extra Privileges Comment 2092show keys from t2; 2093Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment 2094t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE 2095t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE 2096t2 1 fld3 1 fld3 A NULL NULL NULL BTREE 2097drop table t4, t3, t2, t1; 2098CREATE TABLE t1 ( 2099cont_nr int(11) NOT NULL auto_increment, 2100ver_nr int(11) NOT NULL default '0', 2101aufnr int(11) NOT NULL default '0', 2102username varchar(50) NOT NULL default '', 2103hdl_nr int(11) NOT NULL default '0', 2104eintrag date NOT NULL default '0000-00-00', 2105st_klasse varchar(40) NOT NULL default '', 2106st_wert varchar(40) NOT NULL default '', 2107st_zusatz varchar(40) NOT NULL default '', 2108st_bemerkung varchar(255) NOT NULL default '', 2109kunden_art varchar(40) NOT NULL default '', 2110mcbs_knr int(11) default NULL, 2111mcbs_aufnr int(11) NOT NULL default '0', 2112schufa_status char(1) default '?', 2113bemerkung text, 2114wirknetz text, 2115wf_igz int(11) NOT NULL default '0', 2116tarifcode varchar(80) default NULL, 2117recycle char(1) default NULL, 2118sim varchar(30) default NULL, 2119mcbs_tpl varchar(30) default NULL, 2120emp_nr int(11) NOT NULL default '0', 2121laufzeit int(11) default NULL, 2122hdl_name varchar(30) default NULL, 2123prov_hdl_nr int(11) NOT NULL default '0', 2124auto_wirknetz varchar(50) default NULL, 2125auto_billing varchar(50) default NULL, 2126touch timestamp NOT NULL, 2127kategorie varchar(50) default NULL, 2128kundentyp varchar(20) NOT NULL default '', 2129sammel_rech_msisdn varchar(30) NOT NULL default '', 2130p_nr varchar(9) NOT NULL default '', 2131suffix char(3) NOT NULL default '', 2132PRIMARY KEY (cont_nr), 2133KEY idx_aufnr(aufnr), 2134KEY idx_hdl_nr(hdl_nr), 2135KEY idx_st_klasse(st_klasse), 2136KEY ver_nr(ver_nr), 2137KEY eintrag_idx(eintrag), 2138KEY emp_nr_idx(emp_nr), 2139KEY wf_igz(wf_igz), 2140KEY touch(touch), 2141KEY hdl_tag(eintrag,hdl_nr), 2142KEY prov_hdl_nr(prov_hdl_nr), 2143KEY mcbs_aufnr(mcbs_aufnr), 2144KEY kundentyp(kundentyp), 2145KEY p_nr(p_nr,suffix) 2146) ENGINE=MyISAM; 2147INSERT 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','','',''); 2148INSERT 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','','',''); 2149INSERT 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','','',''); 2150INSERT 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','','',''); 2151INSERT 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'); 2152INSERT 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','','',''); 2153INSERT 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','','',''); 2154SELECT 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; 2155Kundentyp kategorie 2156Privat (Private Nutzung) Mobilfunk 2157Warnings: 2158Warning 1052 Column 'kundentyp' in group statement is ambiguous 2159drop table t1; 2160SHOW STATUS LIKE 'Compression'; 2161Variable_name Value 2162Compression ON 2163