You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is not possible to get desired results directly from 'analysis' table as it is an OR search from related table. It will search for analyses where zirconium is measured and analyses where any measured value is above 100.
Have to test it for speed, maybe not a good idea. The length of id list will be in thousands.
No idea yet how to do it in one query. Nested queries can be used in Django but it will make two queries anyway.
Another possibility is to create additional analysis summary table with all analyses and results inside.
@ollehints @urtson This is the same problem like Preparation table has with 'taxonlist' fields.
This link should only show Analysed components 'Zr' which have contents over 100.
http://arendus.geokogud.info/analysis?sample_number_1=5&sample_number=&locality_1=1&locality=&stratigraphy_1=1&stratigraphy=&stratigraphy_bed_1=1&stratigraphy_bed=&analysis_1=1&analysis=&component_1=1&component=Zr&sample_id_1=1&sample_id=&country_1=1&country=&content_1=7&content=100&dbs%5B%5D=1&dbs%5B%5D=2&dbs%5B%5D=3&dbs%5B%5D=4&dbs%5B%5D=5&dbs%5B%5D=6¤tTable=analysis&maxSize=5&sort=id&sortdir=DESC
Here are API links, which show differences
https://api.arendus.geokogud.info/analysis/?paginate_by=30&page=1&order_by=-id&distinct=true&analysisresults__name__icontains=Zr&analysisresults__value__gt=100
https://api.arendus.geokogud.info/analysis_results/?paginate_by=30&page=1&order_by=-id&distinct=true&name__icontains=Zr&value__gt=100
The text was updated successfully, but these errors were encountered: