mysql> use pokemon
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-------------------+
| Tables_in_pokemon |
+-------------------+
| Attributes        |
| Evolution         |
| PokeData          |
| PokeStats         |
| Pokemon           |
| SpTypes           |
| Species           |
| Types             |
| fff               |
| foo               |
| poke10            |
| poke10s           |
| poke5             |
| pokefoo           |
| tmp               |
| ttt               |
+-------------------+
16 rows in set (0.01 sec)

mysql> select * from PokeData
    -> where weight > (select MAX(weight) from PokeData where type = 'water');
+-----------+-----------+--------+--------+----------------+------------+--------+------+--------+
| Name      | PokedexID | Height | Weight | BaseExperience | Genus      | Type   | gen  | typeId |
+-----------+-----------+--------+--------+----------------+------------+--------+------+--------+
| Giratina  |       487 |     45 |   7500 |            220 | Renegade   | ghost  |    4 |      0 |
| Regigigas |       486 |     37 |   4200 |            220 | Colossal   | normal |    4 |      0 |
| Heatran   |       485 |     17 |   4300 |            215 | Lava Dome  | fire   |    4 |      0 |
| Dialga    |       483 |     54 |   6830 |            220 | Temporal   | steel  |    4 |      0 |
| Groudon   |       383 |     35 |   9500 |            218 | Continent  | ground |    3 |      0 |
| Metagross |       376 |     16 |   5500 |            210 | Iron Leg   | steel  |    3 |      0 |
| Steelix   |       208 |     92 |   4000 |            196 | Iron Snake | steel  |    2 |      0 |
| Snorlax   |       143 |     21 |   4600 |            154 | Sleeping   | normal |    1 |      0 |
+-----------+-----------+--------+--------+----------------+------------+--------+------+--------+
8 rows in set (0.00 sec)

mysql> select * from PokeData where weight = (select MAX(weight) from PokeData );
+---------+-----------+--------+--------+----------------+-----------+--------+------+--------+
| Name    | PokedexID | Height | Weight | BaseExperience | Genus     | Type   | gen  | typeId |
+---------+-----------+--------+--------+----------------+-----------+--------+------+--------+
| Groudon |       383 |     35 |   9500 |            218 | Continent | ground |    3 |      0 |
+---------+-----------+--------+--------+----------------+-----------+--------+------+--------+
1 row in set (0.02 sec)

mysql> select PokeDexId from PokeData where weight < 50 and type = 'water';
+-----------+
| PokeDexId |
+-----------+
|       535 |
|       490 |
|       489 |
|       339 |
|       270 |
|       211 |
|        90 |
+-----------+
7 rows in set (0.00 sec)

mysql> select Name 
    -> from PokeData
    -> where weight > ALL (select weight from PokeData where height > 30) and height < 30;
Empty set (0.01 sec)

mysql> select Name  from PokeData where weight > ALL (select weight from PokeData where height > 30) and height < 40;
Empty set (0.00 sec)

mysql> select Name  from PokeData where weight > ALL (select weight from PokeData where height > 30);
Empty set (0.00 sec)

mysql> select Name  from PokeData where weight > ALL (select weight from PokeData where height < 30);
+----------+
| Name     |
+----------+
| Giratina |
| Dialga   |
| Groudon  |
+----------+
3 rows in set (0.00 sec)

mysql> select Name  from PokeData where weight > ANY(select weight from PokeData where height < 30);
+------------+
| Name       |
+------------+
| Genesect   |
| Meloetta   |
| Keldeo     |
| Kyurem     |
| Landorus   |
| Zekrom     |
| Reshiram   |
| Thundurus  |
| Tornadus   |
| Virizion   |
| Terrakion  |
| Cobalion   |
| Volcarona  |
| Larvesta   |
| Hydreigon  |
| Zweilous   |
| Deino      |
| Durant     |
| Heatmor    |
| Mandibuzz  |
| Vullaby    |
| Braviary   |
| Rufflet    |
| Bouffalant |
| Bisharp    |
| Pawniard   |
| Golurk     |
| Golett     |
| Druddigon  |
| Mienshao   |
| Mienfoo    |
| Stunfisk   |
| Accelgor   |
| Shelmet    |
| Cryogonal  |
| Beartic    |
| Cubchoo    |
| Haxorus    |
| Fraxure    |
| Axew       |
| Chandelure |
| Lampent    |
| Litwick    |
| Beheeyem   |
| Elgyem     |
| Eelektross |
| Eelektrik  |
| Tynamo     |
| Klinklang  |
| Klang      |
| Klink      |
| Ferrothorn |
| Ferroseed  |
| Galvantula |
| Joltik     |
| Alomomola  |
| Jellicent  |
| Frillish   |
| Amoonguss  |
| Foongus    |
| Escavalier |
| Karrablast |
| Emolga     |
| Sawsbuck   |
| Deerling   |
| Vanilluxe  |
| Vanillish  |
| Vanillite  |
| Swanna     |
| Ducklett   |
| Reuniclus  |
| Duosion    |
| Solosis    |
| Gothitelle |
| Gothorita  |
| Gothita    |
| Cinccino   |
| Minccino   |
| Zoroark    |
| Zorua      |
| Garbodor   |
| Trubbish   |
| Archeops   |
| Archen     |
| Carracosta |
| Tirtouga   |
| Cofagrigus |
| Yamask     |
| Sigilyph   |
| Scrafty    |
| Scraggy    |
| Crustle    |
| Dwebble    |
| Maractus   |
| Darmanitan |
| Darumaka   |
| Krookodile |
| Krokorok   |
| Sandile    |
| Basculin   |
| Lilligant  |
| Petilil    |
| Whimsicott |
| Cottonee   |
| Scolipede  |
| Whirlipede |
| Venipede   |
| Leavanny   |
| Swadloon   |
| Sewaddle   |
| Sawk       |
| Throh      |
| Seismitoad |
| Palpitoad  |
| Tympole    |
| Conkeldurr |
| Gurdurr    |
| Timburr    |
| Audino     |
| Excadrill  |
| Drilbur    |
| Swoobat    |
| Woobat     |
| Gigalith   |
| Boldore    |
| Roggenrola |
| Zebstrika  |
| Blitzle    |
| Unfezant   |
| Tranquill  |
| Pidove     |
| Musharna   |
| Munna      |
| Simipour   |
| Panpour    |
| Simisear   |
| Pansear    |
| Simisage   |
| Pansage    |
| Liepard    |
| Purrloin   |
| Stoutland  |
| Herdier    |
| Lillipup   |
| Watchog    |
| Patrat     |
| Samurott   |
| Dewott     |
| Oshawott   |
| Emboar     |
| Pignite    |
| Tepig      |
| Serperior  |
| Servine    |
| Snivy      |
| Victini    |
| Arceus     |
| Shaymin    |
| Darkrai    |
| Manaphy    |
| Phione     |
| Cresselia  |
| Giratina   |
| Regigigas  |
| Heatran    |
| Palkia     |
| Dialga     |
| Azelf      |
| Mesprit    |
| Uxie       |
| Rotom      |
| Froslass   |
| Dusknoir   |
| Probopass  |
| Gallade    |
| Porygon-Z  |
| Mamoswine  |
| Gliscor    |
| Glaceon    |
| Leafeon    |
| Yanmega    |
| Togekiss   |
| Magmortar  |
| Electivire |
| Tangrowth  |
| Rhyperior  |
| Lickilicky |
| Magnezone  |
| Weavile    |
| Abomasnow  |
| Snover     |
| Mantyke    |
| Lumineon   |
| Finneon    |
| Carnivine  |
| Toxicroak  |
| Croagunk   |
| Drapion    |
| Skorupi    |
| Hippowdon  |
| Hippopotas |
| Lucario    |
| Riolu      |
| Munchlax   |
| Garchomp   |
| Gabite     |
| Gible      |
| Spiritomb  |
| Chatot     |
| Happiny    |
| Mime Jr.   |
| Bonsly     |
| Bronzong   |
| Bronzor    |
| Skuntank   |
| Stunky     |
| Chingling  |
| Purugly    |
| Glameow    |
| Honchkrow  |
| Mismagius  |
| Lopunny    |
| Buneary    |
| Drifblim   |
| Drifloon   |
| Ambipom    |
| Gastrodon  |
| Shellos    |
| Cherrim    |
| Cherubi    |
| Floatzel   |
| Buizel     |
| Pachirisu  |
| Vespiquen  |
| Combee     |
| Mothim     |
| Wormadam   |
| Burmy      |
| Bastiodon  |
| Shieldon   |
| Rampardos  |
| Cranidos   |
| Roserade   |
| Budew      |
| Luxray     |
| Luxio      |
| Shinx      |
| Kricketune |
| Kricketot  |
| Bibarel    |
| Bidoof     |
| Staraptor  |
| Staravia   |
| Starly     |
| Empoleon   |
| Prinplup   |
| Piplup     |
| Infernape  |
| Monferno   |
| Chimchar   |
| Torterra   |
| Grotle     |
| Turtwig    |
| Deoxys     |
| Jirachi    |
| Rayquaza   |
| Groudon    |
| Kyogre     |
| Latios     |
| Latias     |
| Registeel  |
| Regice     |
| Regirock   |
| Metagross  |
| Metang     |
| Beldum     |
| Salamence  |
| Shelgon    |
| Bagon      |
| Luvdisc    |
| Relicanth  |
| Gorebyss   |
| Huntail    |
| Clamperl   |
| Walrein    |
| Sealeo     |
| Spheal     |
| Glalie     |
| Snorunt    |
| Wynaut     |
| Absol      |
| Chimecho   |
| Tropius    |
| Dusclops   |
| Duskull    |
| Banette    |
| Shuppet    |
| Kecleon    |
| Castform   |
| Milotic    |
| Feebas     |
| Armaldo    |
| Anorith    |
| Cradily    |
| Lileep     |
| Claydol    |
| Baltoy     |
| Crawdaunt  |
| Corphish   |
| Whiscash   |
| Barboach   |
| Solrock    |
| Lunatone   |
| Seviper    |
| Zangoose   |
| Altaria    |
| Swablu     |
| Cacturne   |
| Cacnea     |
| Flygon     |
| Vibrava    |
| Trapinch   |
| Spinda     |
| Grumpig    |
| Spoink     |
| Torkoal    |
| Camerupt   |
| Numel      |
| Wailord    |
| Wailmer    |
| Sharpedo   |
| Carvanha   |
| Swalot     |
| Gulpin     |
| Roselia    |
| Illumise   |
| Volbeat    |
| Minun      |
| Plusle     |
| Manectric  |
| Electrike  |
| Medicham   |
| Meditite   |
| Aggron     |
| Lairon     |
| Aron       |
| Mawile     |
| Sableye    |
| Delcatty   |
| Skitty     |
| Nosepass   |
| Azurill    |
| Hariyama   |
| Makuhita   |
| Exploud    |
| Loudred    |
| Whismur    |
| Shedinja   |
| Ninjask    |
| Nincada    |
| Slaking    |
| Vigoroth   |
| Slakoth    |
| Breloom    |
| Shroomish  |
| Masquerain |
| Surskit    |
| Gardevoir  |
| Kirlia     |
| Ralts      |
| Pelipper   |
| Wingull    |
| Swellow    |
| Taillow    |
| Shiftry    |
| Nuzleaf    |
| Seedot     |
| Ludicolo   |
| Lombre     |
| Lotad      |
| Dustox     |
| Cascoon    |
| Beautifly  |
| Silcoon    |
| Wurmple    |
| Linoone    |
| Zigzagoon  |
| Mightyena  |
| Poochyena  |
| Swampert   |
| Marshtomp  |
| Mudkip     |
| Blaziken   |
| Combusken  |
| Torchic    |
| Sceptile   |
| Grovyle    |
| Treecko    |
| Celebi     |
| Ho-Oh      |
| Lugia      |
| Tyranitar  |
| Pupitar    |
| Larvitar   |
| Suicune    |
| Entei      |
| Raikou     |
| Blissey    |
| Miltank    |
| Magby      |
| Elekid     |
| Smoochum   |
| Hitmontop  |
| Tyrogue    |
| Smeargle   |
| Stantler   |
| Porygon2   |
| Donphan    |
| Phanpy     |
| Kingdra    |
| Houndoom   |
| Houndour   |
| Skarmory   |
| Mantine    |
| Delibird   |
| Octillery  |
| Remoraid   |
| Corsola    |
| Piloswine  |
| Swinub     |
| Magcargo   |
| Slugma     |
| Ursaring   |
| Teddiursa  |
| Sneasel    |
| Heracross  |
| Shuckle    |
| Scizor     |
| Qwilfish   |
| Granbull   |
| Snubbull   |
| Steelix    |
| Gligar     |
| Dunsparce  |
| Forretress |
| Pineco     |
| Girafarig  |
| Wobbuffet  |
| Unown      |
| Misdreavus |
| Slowking   |
| Murkrow    |
| Umbreon    |
| Espeon     |
| Quagsire   |
| Wooper     |
| Yanma      |
| Sunflora   |
| Sunkern    |
| Aipom      |
| Jumpluff   |
| Skiploom   |
| Hoppip     |
| Politoed   |
| Sudowoodo  |
| Azumarill  |
| Marill     |
| Bellossom  |
| Ampharos   |
| Flaaffy    |
| Mareep     |
| Xatu       |
| Natu       |
| Togetic    |
| Togepi     |
| Igglybuff  |
| Cleffa     |
| Pichu      |
| Lanturn    |
| Chinchou   |
| Crobat     |
| Ariados    |
| Spinarak   |
| Ledian     |
| Ledyba     |
| Noctowl    |
| Hoothoot   |
| Furret     |
| Sentret    |
| Feraligatr |
| Croconaw   |
| Totodile   |
| Typhlosion |
| Quilava    |
| Cyndaquil  |
| Meganium   |
| Bayleef    |
| Chikorita  |
| Mew        |
| Mewtwo     |
| Dragonite  |
| Dragonair  |
| Dratini    |
| Moltres    |
| Zapdos     |
| Articuno   |
| Snorlax    |
| Aerodactyl |
| Kabutops   |
| Kabuto     |
| Omastar    |
| Omanyte    |
| Porygon    |
| Flareon    |
| Jolteon    |
| Vaporeon   |
| Eevee      |
| Ditto      |
| Lapras     |
| Gyarados   |
| Magikarp   |
| Tauros     |
| Pinsir     |
| Magmar     |
| Electabuzz |
| Jynx       |
| Scyther    |
| Mr. Mime   |
| Starmie    |
| Staryu     |
| Seaking    |
| Goldeen    |
| Seadra     |
| Horsea     |
| Kangaskhan |
| Tangela    |
| Chansey    |
| Rhydon     |
| Rhyhorn    |
| Weezing    |
| Koffing    |
| Lickitung  |
| Hitmonchan |
| Hitmonlee  |
| Marowak    |
| Cubone     |
| Exeggutor  |
| Exeggcute  |
| Electrode  |
| Voltorb    |
| Kingler    |
| Krabby     |
| Hypno      |
| Drowzee    |
| Onix       |
| Gengar     |
| Cloyster   |
| Shellder   |
| Muk        |
| Grimer     |
| Dewgong    |
| Seel       |
| Dodrio     |
| Doduo      |
| Farfetch'd |
| Magneton   |
| Magnemite  |
| Slowbro    |
| Slowpoke   |
| Rapidash   |
| Ponyta     |
| Golem      |
| Graveler   |
| Geodude    |
| Tentacruel |
| Tentacool  |
| Victreebel |
| Weepinbell |
| Bellsprout |
| Machamp    |
| Machoke    |
| Machop     |
| Alakazam   |
| Kadabra    |
| Abra       |
| Poliwrath  |
| Poliwhirl  |
| Poliwag    |
| Arcanine   |
| Growlithe  |
| Primeape   |
| Mankey     |
| Golduck    |
| Psyduck    |
| Persian    |
| Meowth     |
| Dugtrio    |
| Diglett    |
| Venomoth   |
| Venonat    |
| Parasect   |
| Paras      |
| Vileplume  |
| Gloom      |
| Oddish     |
| Golbat     |
| Zubat      |
| Wigglytuff |
| Jigglypuff |
| Ninetales  |
| Vulpix     |
| Clefable   |
| Clefairy   |
| Nidoking   |
| Nidorino   |
| Nidoran♂ |
| Nidoqueen  |
| Nidorina   |
| Nidoran♀ |
| Sandslash  |
| Sandshrew  |
| Raichu     |
| Pikachu    |
| Arbok      |
| Ekans      |
| Fearow     |
| Spearow    |
| Raticate   |
| Rattata    |
| Pidgeot    |
| Pidgeotto  |
| Pidgey     |
| Beedrill   |
| Kakuna     |
| Weedle     |
| Butterfree |
| Metapod    |
| Caterpie   |
| Blastoise  |
| Wartortle  |
| Squirtle   |
| Charizard  |
| Charmeleon |
| Charmander |
| Venusaur   |
| Ivysaur    |
| Bulbasaur  |
+------------+
647 rows in set (0.01 sec)

mysql> select distinct height from PokeData order by height desc limit 10;
+--------+
| height |
+--------+
|    145 |
|     92 |
|     88 |
|     70 |
|     65 |
|     62 |
|     54 |
|     52 |
|     45 |
|     42 |
+--------+
10 rows in set (0.00 sec)

mysql> select Name
    -> from PokeData
    -> where height > ANY (select height from PokeData where type = 'fire');
+------------+
| Name       |
+------------+
| Genesect   |
| Meloetta   |
| Keldeo     |
| Kyurem     |
| Landorus   |
| Zekrom     |
| Reshiram   |
| Thundurus  |
| Tornadus   |
| Virizion   |
| Terrakion  |
| Cobalion   |
| Volcarona  |
| Larvesta   |
| Hydreigon  |
| Zweilous   |
| Deino      |
| Heatmor    |
| Mandibuzz  |
| Vullaby    |
| Braviary   |
| Rufflet    |
| Bouffalant |
| Bisharp    |
| Pawniard   |
| Golurk     |
| Golett     |
| Druddigon  |
| Mienshao   |
| Mienfoo    |
| Stunfisk   |
| Accelgor   |
| Cryogonal  |
| Beartic    |
| Cubchoo    |
| Haxorus    |
| Fraxure    |
| Axew       |
| Chandelure |
| Lampent    |
| Beheeyem   |
| Elgyem     |
| Eelektross |
| Eelektrik  |
| Klinklang  |
| Klang      |
| Ferrothorn |
| Ferroseed  |
| Galvantula |
| Alomomola  |
| Jellicent  |
| Frillish   |
| Amoonguss  |
| Escavalier |
| Karrablast |
| Sawsbuck   |
| Deerling   |
| Vanilluxe  |
| Vanillish  |
| Swanna     |
| Ducklett   |
| Reuniclus  |
| Duosion    |
| Gothitelle |
| Gothorita  |
| Cinccino   |
| Zoroark    |
| Zorua      |
| Garbodor   |
| Trubbish   |
| Archeops   |
| Archen     |
| Carracosta |
| Tirtouga   |
| Cofagrigus |
| Yamask     |
| Sigilyph   |
| Scrafty    |
| Scraggy    |
| Crustle    |
| Maractus   |
| Darmanitan |
| Darumaka   |
| Krookodile |
| Krokorok   |
| Sandile    |
| Basculin   |
| Lilligant  |
| Petilil    |
| Whimsicott |
| Scolipede  |
| Whirlipede |
| Leavanny   |
| Swadloon   |
| Sawk       |
| Throh      |
| Seismitoad |
| Palpitoad  |
| Tympole    |
| Conkeldurr |
| Gurdurr    |
| Timburr    |
| Audino     |
| Excadrill  |
| Swoobat    |
| Gigalith   |
| Boldore    |
| Zebstrika  |
| Blitzle    |
| Unfezant   |
| Tranquill  |
| Musharna   |
| Munna      |
| Simipour   |
| Panpour    |
| Simisear   |
| Pansear    |
| Simisage   |
| Pansage    |
| Liepard    |
| Stoutland  |
| Herdier    |
| Watchog    |
| Patrat     |
| Samurott   |
| Dewott     |
| Oshawott   |
| Emboar     |
| Pignite    |
| Tepig      |
| Serperior  |
| Servine    |
| Snivy      |
| Arceus     |
| Darkrai    |
| Cresselia  |
| Giratina   |
| Regigigas  |
| Heatran    |
| Palkia     |
| Dialga     |
| Froslass   |
| Dusknoir   |
| Probopass  |
| Gallade    |
| Porygon-Z  |
| Mamoswine  |
| Gliscor    |
| Glaceon    |
| Leafeon    |
| Yanmega    |
| Togekiss   |
| Magmortar  |
| Electivire |
| Tangrowth  |
| Rhyperior  |
| Lickilicky |
| Magnezone  |
| Weavile    |
| Abomasnow  |
| Snover     |
| Mantyke    |
| Lumineon   |
| Carnivine  |
| Toxicroak  |
| Croagunk   |
| Drapion    |
| Skorupi    |
| Hippowdon  |
| Hippopotas |
| Lucario    |
| Riolu      |
| Munchlax   |
| Garchomp   |
| Gabite     |
| Gible      |
| Spiritomb  |
| Chatot     |
| Happiny    |
| Mime Jr.   |
| Bonsly     |
| Bronzong   |
| Bronzor    |
| Skuntank   |
| Purugly    |
| Glameow    |
| Honchkrow  |
| Mismagius  |
| Lopunny    |
| Drifblim   |
| Ambipom    |
| Gastrodon  |
| Cherrim    |
| Floatzel   |
| Buizel     |
| Vespiquen  |
| Mothim     |
| Wormadam   |
| Bastiodon  |
| Shieldon   |
| Rampardos  |
| Cranidos   |
| Roserade   |
| Luxray     |
| Luxio      |
| Shinx      |
| Kricketune |
| Bibarel    |
| Bidoof     |
| Staraptor  |
| Staravia   |
| Empoleon   |
| Prinplup   |
| Infernape  |
| Monferno   |
| Chimchar   |
| Torterra   |
| Grotle     |
| Deoxys     |
| Rayquaza   |
| Groudon    |
| Kyogre     |
| Latios     |
| Latias     |
| Registeel  |
| Regice     |
| Regirock   |
| Metagross  |
| Metang     |
| Beldum     |
| Salamence  |
| Shelgon    |
| Bagon      |
| Luvdisc    |
| Relicanth  |
| Gorebyss   |
| Huntail    |
| Walrein    |
| Sealeo     |
| Spheal     |
| Glalie     |
| Snorunt    |
| Wynaut     |
| Absol      |
| Chimecho   |
| Tropius    |
| Dusclops   |
| Duskull    |
| Banette    |
| Shuppet    |
| Kecleon    |
| Milotic    |
| Feebas     |
| Armaldo    |
| Anorith    |
| Cradily    |
| Lileep     |
| Claydol    |
| Baltoy     |
| Crawdaunt  |
| Corphish   |
| Whiscash   |
| Solrock    |
| Lunatone   |
| Seviper    |
| Zangoose   |
| Altaria    |
| Cacturne   |
| Flygon     |
| Vibrava    |
| Trapinch   |
| Spinda     |
| Grumpig    |
| Spoink     |
| Torkoal    |
| Camerupt   |
| Numel      |
| Wailord    |
| Wailmer    |
| Sharpedo   |
| Carvanha   |
| Swalot     |
| Illumise   |
| Volbeat    |
| Manectric  |
| Electrike  |
| Medicham   |
| Meditite   |
| Aggron     |
| Lairon     |
| Mawile     |
| Sableye    |
| Delcatty   |
| Skitty     |
| Nosepass   |
| Hariyama   |
| Makuhita   |
| Exploud    |
| Loudred    |
| Whismur    |
| Shedinja   |
| Ninjask    |
| Nincada    |
| Slaking    |
| Vigoroth   |
| Slakoth    |
| Breloom    |
| Masquerain |
| Surskit    |
| Gardevoir  |
| Kirlia     |
| Pelipper   |
| Wingull    |
| Swellow    |
| Shiftry    |
| Nuzleaf    |
| Seedot     |
| Ludicolo   |
| Lombre     |
| Lotad      |
| Dustox     |
| Cascoon    |
| Beautifly  |
| Silcoon    |
| Linoone    |
| Mightyena  |
| Poochyena  |
| Swampert   |
| Marshtomp  |
| Blaziken   |
| Combusken  |
| Sceptile   |
| Grovyle    |
| Treecko    |
| Celebi     |
| Ho-Oh      |
| Lugia      |
| Tyranitar  |
| Pupitar    |
| Larvitar   |
| Suicune    |
| Entei      |
| Raikou     |
| Blissey    |
| Miltank    |
| Magby      |
| Elekid     |
| Hitmontop  |
| Tyrogue    |
| Smeargle   |
| Stantler   |
| Porygon2   |
| Donphan    |
| Phanpy     |
| Kingdra    |
| Houndoom   |
| Houndour   |
| Skarmory   |
| Mantine    |
| Delibird   |
| Octillery  |
| Remoraid   |
| Corsola    |
| Piloswine  |
| Magcargo   |
| Slugma     |
| Ursaring   |
| Teddiursa  |
| Sneasel    |
| Heracross  |
| Shuckle    |
| Scizor     |
| Qwilfish   |
| Granbull   |
| Snubbull   |
| Steelix    |
| Gligar     |
| Dunsparce  |
| Forretress |
| Pineco     |
| Girafarig  |
| Wobbuffet  |
| Unown      |
| Misdreavus |
| Slowking   |
| Murkrow    |
| Umbreon    |
| Espeon     |
| Quagsire   |
| Yanma      |
| Sunflora   |
| Aipom      |
| Jumpluff   |
| Skiploom   |
| Politoed   |
| Sudowoodo  |
| Azumarill  |
| Ampharos   |
| Flaaffy    |
| Mareep     |
| Xatu       |
| Togetic    |
| Lanturn    |
| Chinchou   |
| Crobat     |
| Ariados    |
| Spinarak   |
| Ledian     |
| Ledyba     |
| Noctowl    |
| Hoothoot   |
| Furret     |
| Sentret    |
| Feraligatr |
| Croconaw   |
| Totodile   |
| Typhlosion |
| Quilava    |
| Cyndaquil  |
| Meganium   |
| Bayleef    |
| Chikorita  |
| Mewtwo     |
| Dragonite  |
| Dragonair  |
| Dratini    |
| Moltres    |
| Zapdos     |
| Articuno   |
| Snorlax    |
| Aerodactyl |
| Kabutops   |
| Kabuto     |
| Omastar    |
| Porygon    |
| Flareon    |
| Jolteon    |
| Vaporeon   |
| Lapras     |
| Gyarados   |
| Magikarp   |
| Tauros     |
| Pinsir     |
| Magmar     |
| Electabuzz |
| Jynx       |
| Scyther    |
| Mr. Mime   |
| Starmie    |
| Staryu     |
| Seaking    |
| Goldeen    |
| Seadra     |
| Kangaskhan |
| Tangela    |
| Chansey    |
| Rhydon     |
| Rhyhorn    |
| Weezing    |
| Koffing    |
| Lickitung  |
| Hitmonchan |
| Hitmonlee  |
| Marowak    |
| Exeggutor  |
| Electrode  |
| Voltorb    |
| Kingler    |
| Hypno      |
| Drowzee    |
| Onix       |
| Gengar     |
| Haunter    |
| Gastly     |
| Cloyster   |
| Muk        |
| Grimer     |
| Dewgong    |
| Seel       |
| Dodrio     |
| Doduo      |
| Farfetch'd |
| Magneton   |
| Slowbro    |
| Slowpoke   |
| Rapidash   |
| Ponyta     |
| Golem      |
| Graveler   |
| Tentacruel |
| Tentacool  |
| Victreebel |
| Weepinbell |
| Bellsprout |
| Machamp    |
| Machoke    |
| Machop     |
| Alakazam   |
| Kadabra    |
| Abra       |
| Poliwrath  |
| Poliwhirl  |
| Poliwag    |
| Arcanine   |
| Growlithe  |
| Primeape   |
| Mankey     |
| Golduck    |
| Psyduck    |
| Persian    |
| Dugtrio    |
| Venomoth   |
| Venonat    |
| Parasect   |
| Vileplume  |
| Gloom      |
| Oddish     |
| Golbat     |
| Zubat      |
| Wigglytuff |
| Jigglypuff |
| Ninetales  |
| Vulpix     |
| Clefable   |
| Clefairy   |
| Nidoking   |
| Nidorino   |
| Nidoran♂ |
| Nidoqueen  |
| Nidorina   |
| Sandslash  |
| Sandshrew  |
| Raichu     |
| Arbok      |
| Ekans      |
| Fearow     |
| Raticate   |
| Pidgeot    |
| Pidgeotto  |
| Beedrill   |
| Kakuna     |
| Butterfree |
| Metapod    |
| Blastoise  |
| Wartortle  |
| Squirtle   |
| Charizard  |
| Charmeleon |
| Charmander |
| Venusaur   |
| Ivysaur    |
| Bulbasaur  |
+------------+
552 rows in set (0.01 sec)

mysql> select Name from PokeData where height > (select min(height) from PokeData where type = 'fire');
+------------+
| Name       |
+------------+
| Genesect   |
| Meloetta   |
| Keldeo     |
| Kyurem     |
| Landorus   |
| Zekrom     |
| Reshiram   |
| Thundurus  |
| Tornadus   |
| Virizion   |
| Terrakion  |
| Cobalion   |
| Volcarona  |
| Larvesta   |
| Hydreigon  |
| Zweilous   |
| Deino      |
| Heatmor    |
| Mandibuzz  |
| Vullaby    |
| Braviary   |
| Rufflet    |
| Bouffalant |
| Bisharp    |
| Pawniard   |
| Golurk     |
| Golett     |
| Druddigon  |
| Mienshao   |
| Mienfoo    |
| Stunfisk   |
| Accelgor   |
| Cryogonal  |
| Beartic    |
| Cubchoo    |
| Haxorus    |
| Fraxure    |
| Axew       |
| Chandelure |
| Lampent    |
| Beheeyem   |
| Elgyem     |
| Eelektross |
| Eelektrik  |
| Klinklang  |
| Klang      |
| Ferrothorn |
| Ferroseed  |
| Galvantula |
| Alomomola  |
| Jellicent  |
| Frillish   |
| Amoonguss  |
| Escavalier |
| Karrablast |
| Sawsbuck   |
| Deerling   |
| Vanilluxe  |
| Vanillish  |
| Swanna     |
| Ducklett   |
| Reuniclus  |
| Duosion    |
| Gothitelle |
| Gothorita  |
| Cinccino   |
| Zoroark    |
| Zorua      |
| Garbodor   |
| Trubbish   |
| Archeops   |
| Archen     |
| Carracosta |
| Tirtouga   |
| Cofagrigus |
| Yamask     |
| Sigilyph   |
| Scrafty    |
| Scraggy    |
| Crustle    |
| Maractus   |
| Darmanitan |
| Darumaka   |
| Krookodile |
| Krokorok   |
| Sandile    |
| Basculin   |
| Lilligant  |
| Petilil    |
| Whimsicott |
| Scolipede  |
| Whirlipede |
| Leavanny   |
| Swadloon   |
| Sawk       |
| Throh      |
| Seismitoad |
| Palpitoad  |
| Tympole    |
| Conkeldurr |
| Gurdurr    |
| Timburr    |
| Audino     |
| Excadrill  |
| Swoobat    |
| Gigalith   |
| Boldore    |
| Zebstrika  |
| Blitzle    |
| Unfezant   |
| Tranquill  |
| Musharna   |
| Munna      |
| Simipour   |
| Panpour    |
| Simisear   |
| Pansear    |
| Simisage   |
| Pansage    |
| Liepard    |
| Stoutland  |
| Herdier    |
| Watchog    |
| Patrat     |
| Samurott   |
| Dewott     |
| Oshawott   |
| Emboar     |
| Pignite    |
| Tepig      |
| Serperior  |
| Servine    |
| Snivy      |
| Arceus     |
| Darkrai    |
| Cresselia  |
| Giratina   |
| Regigigas  |
| Heatran    |
| Palkia     |
| Dialga     |
| Froslass   |
| Dusknoir   |
| Probopass  |
| Gallade    |
| Porygon-Z  |
| Mamoswine  |
| Gliscor    |
| Glaceon    |
| Leafeon    |
| Yanmega    |
| Togekiss   |
| Magmortar  |
| Electivire |
| Tangrowth  |
| Rhyperior  |
| Lickilicky |
| Magnezone  |
| Weavile    |
| Abomasnow  |
| Snover     |
| Mantyke    |
| Lumineon   |
| Carnivine  |
| Toxicroak  |
| Croagunk   |
| Drapion    |
| Skorupi    |
| Hippowdon  |
| Hippopotas |
| Lucario    |
| Riolu      |
| Munchlax   |
| Garchomp   |
| Gabite     |
| Gible      |
| Spiritomb  |
| Chatot     |
| Happiny    |
| Mime Jr.   |
| Bonsly     |
| Bronzong   |
| Bronzor    |
| Skuntank   |
| Purugly    |
| Glameow    |
| Honchkrow  |
| Mismagius  |
| Lopunny    |
| Drifblim   |
| Ambipom    |
| Gastrodon  |
| Cherrim    |
| Floatzel   |
| Buizel     |
| Vespiquen  |
| Mothim     |
| Wormadam   |
| Bastiodon  |
| Shieldon   |
| Rampardos  |
| Cranidos   |
| Roserade   |
| Luxray     |
| Luxio      |
| Shinx      |
| Kricketune |
| Bibarel    |
| Bidoof     |
| Staraptor  |
| Staravia   |
| Empoleon   |
| Prinplup   |
| Infernape  |
| Monferno   |
| Chimchar   |
| Torterra   |
| Grotle     |
| Deoxys     |
| Rayquaza   |
| Groudon    |
| Kyogre     |
| Latios     |
| Latias     |
| Registeel  |
| Regice     |
| Regirock   |
| Metagross  |
| Metang     |
| Beldum     |
| Salamence  |
| Shelgon    |
| Bagon      |
| Luvdisc    |
| Relicanth  |
| Gorebyss   |
| Huntail    |
| Walrein    |
| Sealeo     |
| Spheal     |
| Glalie     |
| Snorunt    |
| Wynaut     |
| Absol      |
| Chimecho   |
| Tropius    |
| Dusclops   |
| Duskull    |
| Banette    |
| Shuppet    |
| Kecleon    |
| Milotic    |
| Feebas     |
| Armaldo    |
| Anorith    |
| Cradily    |
| Lileep     |
| Claydol    |
| Baltoy     |
| Crawdaunt  |
| Corphish   |
| Whiscash   |
| Solrock    |
| Lunatone   |
| Seviper    |
| Zangoose   |
| Altaria    |
| Cacturne   |
| Flygon     |
| Vibrava    |
| Trapinch   |
| Spinda     |
| Grumpig    |
| Spoink     |
| Torkoal    |
| Camerupt   |
| Numel      |
| Wailord    |
| Wailmer    |
| Sharpedo   |
| Carvanha   |
| Swalot     |
| Illumise   |
| Volbeat    |
| Manectric  |
| Electrike  |
| Medicham   |
| Meditite   |
| Aggron     |
| Lairon     |
| Mawile     |
| Sableye    |
| Delcatty   |
| Skitty     |
| Nosepass   |
| Hariyama   |
| Makuhita   |
| Exploud    |
| Loudred    |
| Whismur    |
| Shedinja   |
| Ninjask    |
| Nincada    |
| Slaking    |
| Vigoroth   |
| Slakoth    |
| Breloom    |
| Masquerain |
| Surskit    |
| Gardevoir  |
| Kirlia     |
| Pelipper   |
| Wingull    |
| Swellow    |
| Shiftry    |
| Nuzleaf    |
| Seedot     |
| Ludicolo   |
| Lombre     |
| Lotad      |
| Dustox     |
| Cascoon    |
| Beautifly  |
| Silcoon    |
| Linoone    |
| Mightyena  |
| Poochyena  |
| Swampert   |
| Marshtomp  |
| Blaziken   |
| Combusken  |
| Sceptile   |
| Grovyle    |
| Treecko    |
| Celebi     |
| Ho-Oh      |
| Lugia      |
| Tyranitar  |
| Pupitar    |
| Larvitar   |
| Suicune    |
| Entei      |
| Raikou     |
| Blissey    |
| Miltank    |
| Magby      |
| Elekid     |
| Hitmontop  |
| Tyrogue    |
| Smeargle   |
| Stantler   |
| Porygon2   |
| Donphan    |
| Phanpy     |
| Kingdra    |
| Houndoom   |
| Houndour   |
| Skarmory   |
| Mantine    |
| Delibird   |
| Octillery  |
| Remoraid   |
| Corsola    |
| Piloswine  |
| Magcargo   |
| Slugma     |
| Ursaring   |
| Teddiursa  |
| Sneasel    |
| Heracross  |
| Shuckle    |
| Scizor     |
| Qwilfish   |
| Granbull   |
| Snubbull   |
| Steelix    |
| Gligar     |
| Dunsparce  |
| Forretress |
| Pineco     |
| Girafarig  |
| Wobbuffet  |
| Unown      |
| Misdreavus |
| Slowking   |
| Murkrow    |
| Umbreon    |
| Espeon     |
| Quagsire   |
| Yanma      |
| Sunflora   |
| Aipom      |
| Jumpluff   |
| Skiploom   |
| Politoed   |
| Sudowoodo  |
| Azumarill  |
| Ampharos   |
| Flaaffy    |
| Mareep     |
| Xatu       |
| Togetic    |
| Lanturn    |
| Chinchou   |
| Crobat     |
| Ariados    |
| Spinarak   |
| Ledian     |
| Ledyba     |
| Noctowl    |
| Hoothoot   |
| Furret     |
| Sentret    |
| Feraligatr |
| Croconaw   |
| Totodile   |
| Typhlosion |
| Quilava    |
| Cyndaquil  |
| Meganium   |
| Bayleef    |
| Chikorita  |
| Mewtwo     |
| Dragonite  |
| Dragonair  |
| Dratini    |
| Moltres    |
| Zapdos     |
| Articuno   |
| Snorlax    |
| Aerodactyl |
| Kabutops   |
| Kabuto     |
| Omastar    |
| Porygon    |
| Flareon    |
| Jolteon    |
| Vaporeon   |
| Lapras     |
| Gyarados   |
| Magikarp   |
| Tauros     |
| Pinsir     |
| Magmar     |
| Electabuzz |
| Jynx       |
| Scyther    |
| Mr. Mime   |
| Starmie    |
| Staryu     |
| Seaking    |
| Goldeen    |
| Seadra     |
| Kangaskhan |
| Tangela    |
| Chansey    |
| Rhydon     |
| Rhyhorn    |
| Weezing    |
| Koffing    |
| Lickitung  |
| Hitmonchan |
| Hitmonlee  |
| Marowak    |
| Exeggutor  |
| Electrode  |
| Voltorb    |
| Kingler    |
| Hypno      |
| Drowzee    |
| Onix       |
| Gengar     |
| Haunter    |
| Gastly     |
| Cloyster   |
| Muk        |
| Grimer     |
| Dewgong    |
| Seel       |
| Dodrio     |
| Doduo      |
| Farfetch'd |
| Magneton   |
| Slowbro    |
| Slowpoke   |
| Rapidash   |
| Ponyta     |
| Golem      |
| Graveler   |
| Tentacruel |
| Tentacool  |
| Victreebel |
| Weepinbell |
| Bellsprout |
| Machamp    |
| Machoke    |
| Machop     |
| Alakazam   |
| Kadabra    |
| Abra       |
| Poliwrath  |
| Poliwhirl  |
| Poliwag    |
| Arcanine   |
| Growlithe  |
| Primeape   |
| Mankey     |
| Golduck    |
| Psyduck    |
| Persian    |
| Dugtrio    |
| Venomoth   |
| Venonat    |
| Parasect   |
| Vileplume  |
| Gloom      |
| Oddish     |
| Golbat     |
| Zubat      |
| Wigglytuff |
| Jigglypuff |
| Ninetales  |
| Vulpix     |
| Clefable   |
| Clefairy   |
| Nidoking   |
| Nidorino   |
| Nidoran♂ |
| Nidoqueen  |
| Nidorina   |
| Sandslash  |
| Sandshrew  |
| Raichu     |
| Arbok      |
| Ekans      |
| Fearow     |
| Raticate   |
| Pidgeot    |
| Pidgeotto  |
| Beedrill   |
| Kakuna     |
| Butterfree |
| Metapod    |
| Blastoise  |
| Wartortle  |
| Squirtle   |
| Charizard  |
| Charmeleon |
| Charmander |
| Venusaur   |
| Ivysaur    |
| Bulbasaur  |
+------------+
552 rows in set (0.01 sec)

mysql> select PokeDexId, Name, height
    -> from PokeData
    -> where height = (SELECT MAX(height) from PokeData);
+-----------+---------+--------+
| PokeDexId | Name    | height |
+-----------+---------+--------+
|       321 | Wailord |    145 |
+-----------+---------+--------+
1 row in set (0.00 sec)

mysql> select PokeDexId, Name, height from PokeData where height = (SELECT MAX(height) from PokeData where type = 'water') where type = 'water';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where type = 'water'' at line 1
mysql> select PokeDexId, Name, height from PokeData where height = (SELECT MAX(height) from PokeData where type = 'water') and type = 'water';
+-----------+---------+--------+
| PokeDexId | Name    | height |
+-----------+---------+--------+
|       321 | Wailord |    145 |
+-----------+---------+--------+
1 row in set (0.00 sec)

mysql> select PokeDexId, Name, height from PokeData where height = (SELECT MAX(height) from PokeData where type = 'ice') and type = 'ice';
+-----------+---------+--------+
| PokeDexId | Name    | height |
+-----------+---------+--------+
|       614 | Beartic |     26 |
+-----------+---------+--------+
1 row in set (0.00 sec)

mysql> select 'ice' ,PokeDexId, Name, height from PokeData where height = (SELECT MAX(height) from PokeData where type = 'ice') and type = 'ice';
+-----+-----------+---------+--------+
| ice | PokeDexId | Name    | height |
+-----+-----------+---------+--------+
| ice |       614 | Beartic |     26 |
+-----+-----------+---------+--------+
1 row in set (0.01 sec)

mysql> select type, max(height)
    -> from PokeData
    -> group by type;
+----------+-------------+
| type     | max(height) |
+----------+-------------+
| bug      |          25 |
| dark     |          18 |
| dragon   |          70 |
| electric |          21 |
| fighting |          23 |
| fire     |          38 |
| flying   |          15 |
| ghost    |          45 |
| grass    |          33 |
| ground   |          35 |
| ice      |          26 |
| normal   |          37 |
| poison   |          35 |
| psychic  |          52 |
| rock     |          88 |
| steel    |          92 |
| water    |         145 |
+----------+-------------+
17 rows in set (0.01 sec)

mysql> 
mysql> select type, PokeDexId, Name, height
    -> from PokeData d
    -> where d.height = (select max(height)
    ->                   from PokeData d1
    ->                   where d1.type = d.type)
    -> 
    -> ;
+----------+-----------+------------+--------+
| type     | PokeDexId | Name       | height |
+----------+-----------+------------+--------+
| flying   |       641 | Tornadus   |     15 |
| dark     |       635 | Hydreigon  |     18 |
| ice      |       614 | Beartic    |     26 |
| electric |       604 | Eelektross |     21 |
| bug      |       545 | Scolipede  |     25 |
| grass    |       497 | Serperior  |     33 |
| ghost    |       487 | Giratina   |     45 |
| normal   |       486 | Regigigas  |     37 |
| dragon   |       384 | Rayquaza   |     70 |
| ground   |       383 | Groudon    |     35 |
| water    |       321 | Wailord    |    145 |
| fighting |       297 | Hariyama   |     23 |
| fire     |       250 | Ho-Oh      |     38 |
| psychic  |       249 | Lugia      |     52 |
| steel    |       208 | Steelix    |     92 |
| rock     |        95 | Onix       |     88 |
| poison   |        24 | Arbok      |     35 |
+----------+-----------+------------+--------+
17 rows in set (0.23 sec)

mysql> insert into PokeData(PokeDexId, Name, height, type)
    -> values(1000, 'FakeChu', 26,'ice');
Query OK, 1 row affected (0.01 sec)

mysql> select type, PokeDexId, Name, height from PokeData d where d.height = (select max(height)                   from PokeData d1                   where d1.type = d.type);
+----------+-----------+------------+--------+
| type     | PokeDexId | Name       | height |
+----------+-----------+------------+--------+
| flying   |       641 | Tornadus   |     15 |
| dark     |       635 | Hydreigon  |     18 |
| ice      |       614 | Beartic    |     26 |
| electric |       604 | Eelektross |     21 |
| bug      |       545 | Scolipede  |     25 |
| grass    |       497 | Serperior  |     33 |
| ghost    |       487 | Giratina   |     45 |
| normal   |       486 | Regigigas  |     37 |
| dragon   |       384 | Rayquaza   |     70 |
| ground   |       383 | Groudon    |     35 |
| water    |       321 | Wailord    |    145 |
| fighting |       297 | Hariyama   |     23 |
| fire     |       250 | Ho-Oh      |     38 |
| psychic  |       249 | Lugia      |     52 |
| steel    |       208 | Steelix    |     92 |
| rock     |        95 | Onix       |     88 |
| poison   |        24 | Arbok      |     35 |
| ice      |      1000 | FakeChu    |     26 |
+----------+-----------+------------+--------+
18 rows in set (0.19 sec)

mysql> select type, PokeDexId, Name, height from PokeData d where d.height = (select max(height)                   from PokeData d1                   where d1.type = d.type);
+----------+-----------+------------+--------+
| type     | PokeDexId | Name       | height |
+----------+-----------+------------+--------+
| flying   |       641 | Tornadus   |     15 |
| dark     |       635 | Hydreigon  |     18 |
| ice      |       614 | Beartic    |     26 |
| electric |       604 | Eelektross |     21 |
| bug      |       545 | Scolipede  |     25 |
| grass    |       497 | Serperior  |     33 |
| ghost    |       487 | Giratina   |     45 |
| normal   |       486 | Regigigas  |     37 |
| dragon   |       384 | Rayquaza   |     70 |
| ground   |       383 | Groudon    |     35 |
| water    |       321 | Wailord    |    145 |
| fighting |       297 | Hariyama   |     23 |
| fire     |       250 | Ho-Oh      |     38 |
| psychic  |       249 | Lugia      |     52 |
| steel    |       208 | Steelix    |     92 |
| rock     |        95 | Onix       |     88 |
| poison   |        24 | Arbok      |     35 |
| ice      |      1000 | FakeChu    |     26 |
+----------+-----------+------------+--------+
18 rows in set (0.01 sec)

mysql> select d.type, d.pokedexid, d.name, d.height
    -> FROM PokeData d, 
    ->      (select type, max(height) 
    ->       from PokeData 
    ->       group by type) d1
    -> where d.type = d1.type and d1.height = d.height
    -> ;
ERROR 1054 (42S22): Unknown column 'd1.height' in 'where clause'
mysql> select d.type, d.pokedexid, d.name, d.height
    -> FROM PokeData d, 
    ->      (select type, max(height) as height
    ->       from PokeData 
    ->       group by type) d1
    -> where d.type = d1.type and d1.height = d.height
    -> ;
+----------+-----------+------------+--------+
| type     | pokedexid | name       | height |
+----------+-----------+------------+--------+
| flying   |       641 | Tornadus   |     15 |
| dark     |       635 | Hydreigon  |     18 |
| ice      |       614 | Beartic    |     26 |
| electric |       604 | Eelektross |     21 |
| bug      |       545 | Scolipede  |     25 |
| grass    |       497 | Serperior  |     33 |
| ghost    |       487 | Giratina   |     45 |
| normal   |       486 | Regigigas  |     37 |
| dragon   |       384 | Rayquaza   |     70 |
| ground   |       383 | Groudon    |     35 |
| water    |       321 | Wailord    |    145 |
| fighting |       297 | Hariyama   |     23 |
| fire     |       250 | Ho-Oh      |     38 |
| psychic  |       249 | Lugia      |     52 |
| steel    |       208 | Steelix    |     92 |
| rock     |        95 | Onix       |     88 |
| poison   |        24 | Arbok      |     35 |
| ice      |      1000 | FakeChu    |     26 |
+----------+-----------+------------+--------+
18 rows in set (0.00 sec)

mysql> exit