terraref / brapi

Breeder's API implementation for TERRA-REF
https://terraref.org/brapi/v1/calls
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

fix duplicate records in observationunits #50

Closed dlebauer closed 3 years ago

dlebauer commented 3 years ago

see https://github.com/az-digitalag/organization/issues/438

updated the query to:

This fixed joining each row to two different treatments. Then I rearranged the joins to join both experiments_sites and experiments_treatments to traits.site_id and traits.treatment_id and only then join to experiments.id