By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
(No column name) |
---|
Microsoft SQL Server 2017 (RTM-CU21) (KB4557397) - 14.0.3335.7 (X64) Jun 12 2020 20:39:00 Copyright (C) 2017 Microsoft Corporation Express Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor) |
8 rows affected
CustomerCode | Frequency | Type | TypeAmount |
---|---|---|---|
C12345 | Monthly | null | null |
C12345 | null | A1 | 5.0000 |
C12345 | null | A2 | 20.0000 |
C12345 | Fornightly | null | null |
C12345 | null | A1 | 5.0000 |
C12345 | null | A2 | 20.0000 |
C56789 | Fornightly | null | null |
C56789 | null | A1 | 50.0000 |
customerCode | frequency | type | TypeAmount | rn |
---|---|---|---|---|
C12345 | Monthly | A1 | 5.0000 | 2 |
C12345 | Monthly | A2 | 20.0000 | 3 |
C12345 | Fornightly | A1 | 5.0000 | 5 |
C12345 | Fornightly | A2 | 20.0000 | 6 |
C56789 | Fornightly | A1 | 50.0000 | 2 |