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

Walks with multiple samples for each section #26

Open
JimBacon opened this issue Oct 20, 2022 · 0 comments
Open

Walks with multiple samples for each section #26

JimBacon opened this issue Oct 20, 2022 · 0 comments

Comments

@JimBacon
Copy link
Member

A record should consist of a parent sample for a walk with one sub-sample for each section in that walk.

When records are imported and the occurrences for a section are not grouped together then the importer will create multiple samples for each section.

The following query finds 707361 instances of sections having multiple samples:

select parent_sample_id, location_id, count(id)
from cache_samples_functional
where survey_id = 64 -- UKBMS transects
	and parent_sample_id is not null
group by parent_sample_id, location_id
having count(*) > 1
order by count(*) desc

Details of how a similar issue was resolved at BiologicalRecordsCentre/ABLE#459

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

No branches or pull requests

1 participant