Created
August 11, 2014 19:20
-
-
Save CatTrinket/439662b3bccceecbf492 to your computer and use it in GitHub Desktop.
how many species of each type (so e.g. Rotom counts once for Electric, once for Ghost, once for Fire...)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asb_test=> select t.name, count(distinct pf.species_id) from types t | |
asb_test-> join pokemon_form_types pft on t.id=pft.type_id | |
asb_test-> join pokemon_forms pf on pft.pokemon_form_id=pf.id | |
asb_test-> group by t.id | |
asb_test-> order by count desc; | |
name | count | |
----------+------- | |
Water | 120 | |
Normal | 97 | |
Flying | 94 | |
Grass | 86 | |
Psychic | 75 | |
Bug | 67 | |
Ground | 62 | |
Poison | 60 | |
Fire | 58 | |
Rock | 56 | |
Fighting | 47 | |
Dark | 46 | |
Electric | 43 | |
Steel | 43 | |
Dragon | 41 | |
Fairy | 36 | |
Ice | 36 | |
Ghost | 35 | |
(18 rows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment