Merge and aggregate datasets: Difference between revisions
Content added Content deleted
(→{{header|jq}}: markup) |
|||
Line 623: | Line 623: | ||
| {SCORE_SUM: add, count: length} |
| {SCORE_SUM: add, count: length} |
||
| {SCORE_SUM, SCORE_AVG: (if .SCORE_SUM and .count > 0 then .SCORE_SUM/.count else null end)}; |
| {SCORE_SUM, SCORE_AVG: (if .SCORE_SUM and .count > 0 then .SCORE_SUM/.count else null end)}; |
||
⚫ | |||
⚫ | |||
# Read the two tables: |
# Read the two tables: |
||
INDEX($patients | [splits("\n")] | map(split(",")) | csv2jsonHelper[]; .PATIENT_ID) as $patients |
INDEX($patients | [splits("\n")] | map(split(",")) | csv2jsonHelper[]; .PATIENT_ID) as $patients |