By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE T
([Row ID] int, [BeginDate] datetime, [EndDate] datetime, [Unique ID] varchar(8), [Amount] int)
;
INSERT INTO T
([Row ID], [BeginDate], [EndDate], [Unique ID], [Amount])
VALUES
(178484, '2018-01-01 00:00:00', '2018-01-31 00:00:00', 'GroupID1', 387.22),
(176555, '2018-03-01 00:00:00', '2018-03-31 00:00:00', 'GroupID1', 751.07),
(170120, '2018-04-01 00:00:00', '2018-04-30 00:00:00', 'GroupID1', 567.48),
(172037, '2018-09-01 00:00:00', '2018-09-30 00:00:00', 'GroupID1', 587.51),
(179024, '2018-10-01 00:00:00', '2018-10-31 00:00:00', 'GroupID1', 63.42),
(182061, '2018-11-01 00:00:00', '2018-11-30 00:00:00', 'GroupID1', 728.04)
;
6 rows affected
SELECT M MonthNumber,
DATENAME(Month, DATEADD(Month, M, -1)) MonthName
FROM T RIGHT JOIN (VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11), (12)) TT(M)
ON MONTH(T.BeginDate) = TT.M
WHERE T.BeginDate IS NULL
MonthNumber | MonthName |
---|---|
2 | February |
5 | May |
6 | June |
7 | July |
8 | August |
12 | December |