Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2011
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.33 KB | None | 0 0
  1. SELECT DISTINCT this.*
  2. FROM pokemon AS this
  3. INNER JOIN pokemon_moves ON (
  4.     pokemon_moves.pokemon_id = this.id
  5.     OR pokemon_moves.pokemon_id = this.evolves_from_pokemon_id
  6.     OR pokemon_moves.pokemon_id = (
  7.         SELECT evolves_from_pokemon_id
  8.         FROM pokemon
  9.         WHERE id = this.evolves_from_pokemon_id
  10.     )
  11. )
  12. WHERE pokemon_moves.move_id = 276
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement