By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
12 rows affected
RecordDate | PatientUID | PatientMRN | PatientSSN | calculated_min_date_for_reference |
---|---|---|---|---|
2023-01-01 | 1 | ABC | 111111111 | 2023-01-01 |
2023-04-01 | 1 | null | null | 2023-01-01 |
2023-07-01 | null | ABC | null | 2023-01-01 |
2023-10-01 | null | null | 111111111 | 2023-01-01 |
2023-02-01 | null | null | null | 2023-02-01 |
2023-03-01 | 2 | DEF | 222222222 | 2023-03-01 |
2023-06-01 | 2 | null | null | 2023-03-01 |
2023-09-01 | null | DEF | null | 2023-03-01 |
2023-12-01 | null | null | 222222222 | 2023-03-01 |
2023-05-01 | null | null | null | 2023-05-01 |
2023-08-01 | null | null | null | 2023-08-01 |
2023-11-01 | null | null | null | 2023-11-01 |
Warning: Null value is eliminated by an aggregate or other SET operation.