Advertisement
Tyler_Elric

Untitled

Mar 31st, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. elect
  2.  species.identifier AS 'id',
  3.  lang.name AS 'language',
  4.  COALESCE((
  5.   SELECT species_flavor.flavor_text
  6.   FROM pokemon_species_flavor_text AS 'species_flavor'
  7.   WHERE
  8.    species_flavor.species_id==species.id
  9.   AND
  10.    species_flavor.language_id==lang.language_id
  11.  ),
  12.  (
  13.   SELECT 'EN:'||species_flavor.flavor_text
  14.   FROM pokemon_species_flavor_text AS 'species_flavor'
  15.   WHERE
  16.    species_flavor.species_id==species.id
  17.   AND
  18.    species_flavor.language_id==9
  19.  )) AS 'pkdx',
  20.  COALESCE((
  21.   SELECT species_names.name
  22.   FROM pokemon_species_names AS 'species_names'
  23.   WHERE
  24.    species_names.local_language_id==lang.language_id
  25.   AND
  26.    species_names.pokemon_species_id==species.id
  27.   ),(
  28.   SELECT 'EN:'||species_names.name
  29.   FROM pokemon_species_names AS 'species_names'
  30.   WHERE
  31.    species_names.local_language_id==9
  32.   AND
  33.    species_names.pokemon_species_id==species.id
  34.  )) AS 'name',
  35.  (
  36.   SELECT stats.identifier
  37.   FROM stats
  38.   WHERE stats.id==species_stat.stat_id
  39.   AND is_battle_only==0
  40.  ) AS 'stat',
  41.  species_stat.base_stat AS 'base'
  42.  FROM
  43.   pokemon_species AS 'species'
  44.  JOIN
  45.   pokemon_stats AS 'species_stat'
  46.  ON
  47.   species_stat.pokemon_id==species.id
  48.  JOIN
  49.   language_names AS 'lang'
  50.  ORDER BY id ASC
  51. /* Use with Veekun's database! */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement