View difference between Paste ID: i2WK6XGy and M053hqs5
SHOW: | | - or go back to the newest paste.
1
select
2
 species.identifier as 'id',
3
 lang.name as 'language',
4
 (
5
  select species_entry.flavor_text
6
  from pokemon_species_flavor_text as 'species_entry'
7
  where species_entry.language_id==lang.language_id
8
  or species_entry.language_id==9
9
  group by species_entry.species_id
10
  having species_entry.version_id==max(species_entry.version_id)
11
 ) as 'pkdx',
12
 coalesce((
13
  select species_names.name
14
  from pokemon_species_names as 'species_names'
15
  where
16
   species_names.local_language_id==lang.language_id
17
  and
18
   species_names.pokemon_species_id==species.id
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
 from
37
  pokemon_species as 'species'
38
 join stats
39
 join
40
  language_names as 'lang'
41
 order by id asc
42
/* Use with Veekun's database! */