A sql lab filled with pokemon data

123456789101112131415161718192021
  1. #Part 1: Importing data
  2. CREATE SCHEMA pokemon;
  3. #Part 2: Simple Selects and Counts
  4. ## What are all the types of pokemon that a pokemon can have?
  5. SELECT name FROM pokemon.types;
  6. ## What is the name of the pokemon with id 45?
  7. SELECT name FROM pokemon.pokemons WHERE pokemons.id = 45;
  8. ## How many pokemon are there?
  9. SELECT COUNT(*) AS "All Pokemon" FROM pokemon.pokemons;
  10. ## How many types are there?
  11. SELECT COUNT(*) FROM pokemon.types;
  12. ## How many pokemon have a secondary type?
  13. SELECT COUNT(secondary_type) FROM pokemon.pokemons;