Skip to content

Commit

Permalink
Query syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber committed Sep 3, 2024
1 parent c47e3a3 commit d7d5bab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tcrdb/resources/assay/TCRdb/queries/TRB_BySample.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ GROUP_CONCAT(DISTINCT r.TRA_CDR3, chr(10)) as TRA_CDR3,
GROUP_CONCAT(DISTINCT r.TRA_CDR3, ';') as TRA_CDR3_URL,
r.folder,
r.workbook,
(SELECT count(*) FROM ResultsBySample r2 WHERE r2.subjectId = r.subjectId AND isequal(r.date, r2.date) AND r2.folder = r.folder AND r2.TRB_CDR3 IS NOT NULL) as totalClonesWithTRB_CDR3,
(SELECT count(*) FROM ResultsBySample r3 WHERE r3.subjectId = r.subjectId AND isequal(r.date, r3.date) AND r3.folder = r.folder ) as totalClonesFromSubject,
(SELECT count(*) as expr FROM ResultsBySample r2 WHERE r2.subjectId = r.subjectId AND isequal(r.date, r2.date) AND r2.folder = r.folder AND r2.TRB_CDR3 IS NOT NULL) as totalClonesWithTRB_CDR3,
(SELECT count(*) as expr FROM ResultsBySample r3 WHERE r3.subjectId = r.subjectId AND isequal(r.date, r3.date) AND r3.folder = r.folder ) as totalClonesFromSubject,

FROM ResultsBySample r
WHERE r.TRB_CDR3 is not null
Expand Down

0 comments on commit d7d5bab

Please sign in to comment.