A sql lab filled with pokemon data

Part2.sql 385B

123456789101112131415
  1. # What are all the types of pokemon that a pokemon can have?
  2. SELECT name
  3. FROM types;
  4. # What is the name of the pokemon with id 45?
  5. SELECT name FROM pokemons WHERE id = 45;
  6. # How many pokemon are there?
  7. SELECT COUNT(*) FROM pokemons;
  8. # How many types are there?
  9. SELECT COUNT(*) FROM types;
  10. # How many pokemon have secondary types?
  11. SELECT COUNT(*) FROM pokemons WHERE secondary_type;