Merge and aggregate datasets: Difference between revisions

m
(Harbour: use VALUES for all INSERT statements)
Line 848:
aAgg := {0, 0.0, ctod("19000101")} && initial values
DO WHILE ! Eof() .AND. xCurId == patient_id
aAgg := {1+aAgg[1], score+aAgg[2], max(visit_date, aAgg[3])} && update
SKIP
ENDDO
INSERT INTO report (patient_id, n, sum_score, avg_score, max_date) ;
136

edits