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