By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
8 rows affected
| StudyNum | SerialNum | PuffCount | MAXDate |
|---|---|---|---|
| 1 | 1 | 1 | 2023-03-31 09:57:41.000 |
| 1 | 1 | 2 | 2023-03-31 09:57:41.000 |
| 2 | 3 | 1 | 2023-03-15 11:22:45.000 |
| 2 | 3 | 2 | 2023-03-15 11:22:45.000 |
| StudyNum | SerialNum | PuffCount | MaxDate |
|---|---|---|---|
| 1 | 1 | 1 | 2023-03-31 09:57:41.000 |
| 1 | 1 | 2 | 2023-03-31 09:57:41.000 |
| 2 | 3 | 1 | 2023-03-15 11:22:45.000 |
| 2 | 3 | 2 | 2023-03-15 11:22:45.000 |
Warning: Null value is eliminated by an aggregate or other SET operation.