| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
-
- --What is each pokemon's primary type?
- select types.name, pokemons.name
- from pokemon.pokemons
- join types on pokemons.primary_type = types.id;
-
-
-
- select pokemons.name, types.name
- from pokemon.pokemons
- join types on pokemons.secondary_type = types.id;
-
-
- --What is Rufflet's secondary type?
- select pokemons.name, types.name
- from pokemon.pokemons
- join types on pokemons.secondary_type = types.id
- where pokemons.name = "Rufflet";
-
- select pokemon_trainer.trainerID
- from pokemon.pokemon_trainer
- join pokemon.pokemons
-
-
- select t.name, count(p.name)
- from pokemon.pokemons p
- join types t
- on p.primary_type = t.id
- group by t.name;
-
- select *
- from pokemon_trainer;
-
- select count(*)
- from pokemon.pokemon_trainer;
-
- select count(*) as "number"
- from types;
-
- select * from pokemon_trainer
- where trainerID = 0 and pokemon_id = 1;
-
- select count(*)
- from pokemon_trainer
- where pokelevel = 100;
|