By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
id | startdate | enddate | status | lengthofstay |
---|---|---|---|---|
1 | 2018-02-15 | 2018-02-22 | discharge | 7 |
2 | 2018-03-05 | 2018-03-08 | discharge | 3 |
1 | 2018-11-01 | 2018-11-21 | discharge | 20 |
2 | 2019-05-15 | 2019-05-20 | discharge | 5 |