SHOW:
|
|
- or go back to the newest paste.
| 1 | select | |
| 2 | species.identifier as 'id', | |
| 3 | lang.name as 'language', | |
| 4 | coalesce(( | |
| 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 |
| 8 | + | |
| 9 | having species_entry.version_id==max(species_entry.version_id) | |
| 10 | ),( | |
| 11 | - | ) as 'pkdx', |
| 11 | + | select 'EN:'||species_entry.flavor_text |
| 12 | from pokemon_species_flavor_text as 'species_entry' | |
| 13 | where species_entry.language_id==9 | |
| 14 | group by species_entry.species_id | |
| 15 | having species_entry.version_id==max(species_entry.version_id) | |
| 16 | )) as 'pkdx', | |
| 17 | coalesce(( | |
| 18 | select species_names.name | |
| 19 | from pokemon_species_names as 'species_names' | |
| 20 | where | |
| 21 | species_names.local_language_id==lang.language_id | |
| 22 | and | |
| 23 | species_names.pokemon_species_id==species.id | |
| 24 | ),( | |
| 25 | select 'EN:'||species_names.name | |
| 26 | from pokemon_species_names as 'species_names' | |
| 27 | where | |
| 28 | species_names.local_language_id==9 | |
| 29 | and | |
| 30 | species_names.pokemon_species_id==species.id | |
| 31 | )) as 'name', | |
| 32 | stats.identifier as 'base', | |
| 33 | ( | |
| 34 | select pokemon_stats.base_stat | |
| 35 | from pokemon_stats | |
| 36 | where | |
| 37 | pokemon_stats.pokemon_id==species.id | |
| 38 | and | |
| 39 | pokemon_stats.stat_id==stats.id | |
| 40 | ) as 'stat' | |
| 41 | from | |
| 42 | pokemon_species as 'species' | |
| 43 | join stats | |
| 44 | join | |
| 45 | language_names as 'lang' | |
| 46 | where stats.is_battle_only==0 | |
| 47 | order by id asc | |
| 48 | /* Use with Veekun's database! */ |