| 12345678910111213141516 |
- ## PART 2: SIMPLE SELECTS AND COUNTS
-
- # What are all the types of pokemon that a pokemon can have?
- SELECT name as "Types" FROM types;
-
- # What is the name of the pokemon with id 45?
- SELECT pokemons.id as "ID", name as "Name" FROM pokemons WHERE id = 45;
-
- # How many pokemon are there?
- SELECT COUNT(name) as "NumSpecies" FROM pokemons;
-
- # How many types are there?
- SELECT COUNT(name) "NumTypes" FROM types;
-
- # How many pokemon have a secondary type?
- SELECT COUNT(secondary_type) "NumSecondType" FROM pokemons;
|