Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange pokemon_moves.order in Gen 2 & 3 #336

Open
magical opened this issue Mar 25, 2021 · 0 comments · May be fixed by #356
Open

Strange pokemon_moves.order in Gen 2 & 3 #336

magical opened this issue Mar 25, 2021 · 0 comments · May be fixed by #356

Comments

@magical
Copy link
Member

magical commented Mar 25, 2021

Inspired by #335 i decided to look into whether we had any other messed up order columns in pokemon_moves. Answer: yes. We have several cases where a pokemon learns multiple moves at the same level and those rows have a mix of NULL and non-NULL order. Also the order doesn't start at 1? There's even one pokemon (Muk) where both moves have a NULL order.

select p.identifier as pokemon, vg.identifier as version_group, tmp.* from (select pokemon_id, version_group_id, level, array_agg("order" order by "order") as "order" from pokemon_moves where level != 0 group by pokemon_id, version_group_id, level having count(*) != 1 and not every("order" is not null)) as tmp join pokemon p on tmp.pokemon_id = p.id join version_groups vg on tmp.version_group_id = vg.id order by version_group_id, pokemon_id, level;

Results:
https://gist.github.com/magical/589445759d7a7ab159fd2be74f228811

@Parnassius Parnassius linked a pull request Aug 8, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant