123456789101112131415161718192021 |
- # What are all the types of pokemon that a pokemon can have?
- SELECT pokemon.types.name
- FROM pokemon.types;
-
- # What is the name of the pokemon with id 45?
- SELECT pokemon.pokemons.name
- FROM pokemon.pokemons
- WHERE pokemon.pokemons.id = 45;
-
- # How many pokemon are there?
- SELECT COUNT(pokemon.pokemons.id)
- FROM pokemon.pokemons;
-
- # How many types are there?
- SELECT COUNT(pokemon.types.id)
- FROM pokemon.types;
-
- # How many pokemon have a secondary type?
- SELECT COUNT(pokemon.pokemons.name)
- FROM pokemon.pokemons
- WHERE pokemon.pokemons.secondary_type IS NOT NULL;
|