View difference between Paste ID: M053hqs5 and dHH0xvv0
SHOW: | | - or go back to the newest paste.
1-
elect
1+
select
2
 species.identifier as 'id',
3
 lang.name as 'language',
4
 (
5-
  select species_flavor.flavor_text
5+
  select species_entry.flavor_text
6-
  from pokemon_species_flavor_text as 'species_flavor'
6+
  from pokemon_species_flavor_text as 'species_entry'
7
  where species_entry.language_id==lang.language_id
8-
   species_flavor.species_id==species.id
8+
  or species_entry.language_id==9
9
  group by species_entry.species_id
10-
   species_flavor.language_id==lang.language_id
10+
  having species_entry.version_id==max(species_entry.version_id)
11-
 ),
11+
 ) as 'pkdx',
12
 coalesce((
13-
  select 'EN:'||species_flavor.flavor_text
13+
14-
  from pokemon_species_flavor_text as 'species_flavor'
14+
15
  where
16-
   species_flavor.species_id==species.id
16+
17
  and
18-
   species_flavor.language_id==9
18+
19-
 )) as 'pkdx',
19+
20
  select 'EN:'||species_names.name
21
  from pokemon_species_names as 'species_names'
22
  where
23
   species_names.local_language_id==9
24
  and
25
   species_names.pokemon_species_id==species.id
26
 )) as 'name',
27
 stats.identifier as 'base',
28
 (
29
  select pokemon_stats.base_stat
30
  from pokemon_stats
31
  where
32
   pokemon_stats.pokemon_id==species.id
33
  and
34
   pokemon_stats.stat_id==stats.id
35
 ) as 'stat'
36-
  select stats.identifier
36+
37-
  from stats
37+
38-
  where stats.id==species_stat.stat_id
38+
 join stats
39-
  and is_battle_only==0
39+
40-
 ) as 'stat',
40+
41-
 species_stat.base_stat as 'base'
41+
42
/* Use with Veekun's database! */