Advertisement
Kalashnikov

Untitled

Jun 23rd, 2011
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.40 KB | None | 0 0
  1. SELECT DISTINCT this.name
  2. FROM pokemon AS this
  3. INNER JOIN pokemon_evolution ON this.id = pokemon_evolution.to_pokemon_id
  4. INNER JOIN pokemon_moves ON (
  5.     pokemon_moves.pokemon_id = this.id
  6.     OR pokemon_moves.pokemon_id = to_pokemon_id
  7.     OR pokemon_moves.pokemon_id = (
  8.         SELECT from_pokemon_id
  9.         FROM pokemon_evolution
  10.         WHERE to_pokemon_id = from_pokemon_id
  11.     )
  12. )
  13. WHERE pokemon_moves.move_id =92;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement