By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
11 rows affected
3 rows affected
| MerchantId | MerchantName | RowNumber | ValidFrom | ValidTo |
|---|---|---|---|---|
| 5 | CoolName2 | 1 | 2026-11-10 00:00:00.0000000 | 9999-12-31 23:59:59.9999999 |
| 5 | CoolName2 | 2 | 2026-11-09 00:00:00.0000000 | 2026-11-10 00:00:00.0000000 |
| 5 | CoolName3 | 3 | 2026-11-08 00:00:00.0000000 | 2026-11-09 00:00:00.0000000 |
| 5 | CoolName3 | 4 | 2026-11-07 00:00:00.0000000 | 2026-11-08 00:00:00.0000000 |
| 5 | CoolName2 | 5 | 2026-11-06 00:00:00.0000000 | 2026-11-07 00:00:00.0000000 |
| 5 | CoolName3 | 6 | 2026-11-05 00:00:00.0000000 | 2026-11-06 00:00:00.0000000 |
| 5 | CoolName3 | 7 | 2026-11-04 00:00:00.0000000 | 2026-11-05 00:00:00.0000000 |
| 5 | CoolName2 | 8 | 2026-11-03 00:00:00.0000000 | 2026-11-04 00:00:00.0000000 |
| 5 | CoolName1 | 9 | 2026-11-02 00:00:00.0000000 | 2026-11-03 00:00:00.0000000 |
| 5 | CoolName1 | 10 | 2026-11-01 00:00:00.0000000 | 2026-11-02 00:00:00.0000000 |
| 6 | OtherName2 | 104 | 2026-11-16 20:26:13.0869930 | 9999-12-31 23:59:59.9999999 |
| 6 | OtherName2 | 102 | 2026-11-16 20:26:12.9776643 | 2026-11-16 20:26:13.0869930 |
| 6 | OtherName1 | 101 | 2026-11-10 00:00:00.0000000 | 2026-11-16 20:26:12.9776643 |
| Source | MerchantId | MerchantName | RowNumber | ValidFrom | ValidTo |
|---|---|---|---|---|---|
| current | 5 | CoolName2 | 1 | 2026-11-10 00:00:00.0000000 | 9999-12-31 23:59:59.9999999 |
| history | 5 | CoolName2 | 2 | 2026-11-09 00:00:00.0000000 | 2026-11-10 00:00:00.0000000 |
| history | 5 | CoolName3 | 3 | 2026-11-08 00:00:00.0000000 | 2026-11-09 00:00:00.0000000 |
| history | 5 | CoolName3 | 4 | 2026-11-07 00:00:00.0000000 | 2026-11-08 00:00:00.0000000 |
| history | 5 | CoolName2 | 5 | 2026-11-06 00:00:00.0000000 | 2026-11-07 00:00:00.0000000 |
| history | 5 | CoolName3 | 6 | 2026-11-05 00:00:00.0000000 | 2026-11-06 00:00:00.0000000 |
| history | 5 | CoolName3 | 7 | 2026-11-04 00:00:00.0000000 | 2026-11-05 00:00:00.0000000 |
| history | 5 | CoolName2 | 8 | 2026-11-03 00:00:00.0000000 | 2026-11-04 00:00:00.0000000 |
| history | 5 | CoolName1 | 9 | 2026-11-02 00:00:00.0000000 | 2026-11-03 00:00:00.0000000 |
| history | 5 | CoolName1 | 10 | 2026-11-01 00:00:00.0000000 | 2026-11-02 00:00:00.0000000 |
| current | 6 | OtherName2 | 104 | 2026-11-16 20:26:13.0869930 | 9999-12-31 23:59:59.9999999 |
| history | 6 | OtherName3 | 103 | 2026-11-16 20:26:13.0869930 | 2026-11-16 20:26:13.0869930 |
| history | 6 | OtherName2 | 102 | 2026-11-16 20:26:12.9776643 | 2026-11-16 20:26:13.0869930 |
| history | 6 | OtherName1 | 101 | 2026-11-10 00:00:00.0000000 | 2026-11-16 20:26:12.9776643 |
| RequestedMerchantId | RequestedMerchantName | RowNumber | ValidFrom | ValidTo |
|---|---|---|---|---|
| 5 | CoolName1 | 10 | 2026-11-01 00:00:00.0000000 | 2026-11-02 00:00:00.0000000 |
| 5 | CoolName2 | 2 | 2026-11-09 00:00:00.0000000 | 2026-11-10 00:00:00.0000000 |
| 5 | CoolName3 | 4 | 2026-11-07 00:00:00.0000000 | 2026-11-08 00:00:00.0000000 |
| 5 | CoolName4 | null | null | null |
| 6 | OtherName1 | 101 | 2026-11-10 00:00:00.0000000 | 2026-11-16 20:26:12.9776643 |
| 6 | OtherName2 | 102 | 2026-11-16 20:26:12.9776643 | 2026-11-16 20:26:13.0869930 |
| 6 | OtherName3 | null | null | null |