From 16276bd6a158d7190f50e6a83ad736b335cdc567 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 16 Feb 2022 16:48:36 +0300 Subject: doc: Update query for fetching case attribute data * doc/database.org: Also join on StrainId for case-attribute data. --- doc/database.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/database.org b/doc/database.org index 99d2905a..32f1f8e0 100644 --- a/doc/database.org +++ b/doc/database.org @@ -1386,7 +1386,8 @@ JOIN Strain st ON pd.StrainId = st.Id LEFT JOIN PublishSE ps ON ps.DataId = pd.Id AND ps.StrainId = pd.StrainId LEFT JOIN NStrain ns ON ns.DataId = pd.Id AND ns.StrainId = pd.StrainId LEFT JOIN CaseAttributeXRefNew cxref ON - cxref.InbredSetId = px.InbredSetId + (cxref.InbredSetId = px.InbredSetId AND + cxref.StrainId = st.Id) LEFT JOIN CaseAttribute ca ON ca.Id = cxref.CaseAttributeId WHERE px.Id = 10006 AND px.PhenotypeId = 28409 LIMIT 10; #+end_src -- cgit v1.2.3