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