By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE PARTITION FUNCTION pfBareMinimum(datetime) AS RANGE RIGHT FOR VALUES('20230101','20230102','20230103','20230104','20230105','20230106','20230107','20230108','20230109','20230110','20230111','20230112','20230113','20230114','20230115','20230116','20230117','20230118','20230119','20230120','20230121','20230122','20230123','20230124','20230125','20230126','20230127','20230128','20230129','20230130','20230131','20230201','20230202','20230203','20230204','20230205','20230206','20230207','20230208','20230209','20230210','20230211','20230212','20230213','20230214','20230215','20230216','20230217','20230218','20230219','20230220','20230221','20230222','20230223','20230224','20230225','20230226','20230227','20230228','20230301','20230302','20230303','20230304','20230305','20230306','20230307','20230308','20230309','20230310','20230311','20230312','20230313','20230314','20230315','20230316','20230317','20230318','20230319','20230320','20230321','20230322','20230323','20230324','20230325','20230326','20230327','20230328','20230329','20230330','20230331','20230401','20230402','20230403','20230404','20230405','20230406','20230407','20230408','20230409','20230410','20230411','20230412','20230413','20230414','20230415','20230416','20230417','20230418','20230419','20230420','20230421','20230422','20230423','20230424','20230425','20230426','20230427','20230428','20230429','20230430','20230501','20230502','20230503','20230504','20230505','20230506','20230507','20230508','20230509','20230510','20230511','20230512','20230513','20230514','20230515','20230516','20230517','20230518','20230519','20230520','20230521','20230522','20230523','20230524','20230525','20230526','20230527','20230528','20230529','20230530','20230531','20230601','20230602','20230603','20230604','20230605','20230606','20230607','20230608','20230609','20230610','20230611','20230612','20230613','20230614','20230615','20230616','20230617','20230618','20230619','20230620','20230621','20230622','20230623','20230624','20230625','20230626','20230627','20230628','20230629','20230630','20230701','20230702','20230703','20230704','20230705','20230706','20230707','20230708','20230709','20230710','20230711','20230712','20230713','20230714','20230715','20230716','20230717','20230718','20230719','20230720','20230721','20230722','20230723','20230724','20230725','20230726','20230727','20230728','20230729','20230730','20230731');
CREATE PARTITION FUNCTION pfLudicrous(datetime) AS RANGE RIGHT FOR VALUES('20230101','20230102','20230103','20230104','20230105','20230106','20230107','20230108','20230109','20230110','20230111','20230112','20230113','20230114','20230115','20230116','20230117','20230118','20230119','20230120','20230121','20230122','20230123','20230124','20230125','20230126','20230127','20230128','20230129','20230130','20230131','20230201','20230202','20230203','20230204','20230205','20230206','20230207','20230208','20230209','20230210','20230211','20230212','20230213','20230214','20230215','20230216','20230217','20230218','20230219','20230220','20230221','20230222','20230223','20230224','20230225','20230226','20230227','20230228','20230301','20230302','20230303','20230304','20230305','20230306','20230307','20230308','20230309','20230310','20230311','20230312','20230313','20230314','20230315','20230316','20230317','20230318','20230319','20230320','20230321','20230322','20230323','20230324','20230325','20230326','20230327','20230328','20230329','20230330','20230331','20230401','20230402','20230403','20230404','20230405','20230406','20230407','20230408','20230409','20230410','20230411','20230412','20230413','20230414','20230415','20230416','20230417','20230418','20230419','20230420','20230421','20230422','20230423','20230424','20230425','20230426','20230427','20230428','20230429','20230430','20230501','20230502','20230503','20230504','20230505','20230506','20230507','20230508','20230509','20230510','20230511','20230512','20230513','20230514','20230515','20230516','20230517','20230
CREATE PARTITION SCHEME psBareMinimum AS PARTITION pfBareMinimum ALL TO ([PRIMARY]);
CREATE PARTITION SCHEME psReasonable AS PARTITION pfReasonable ALL TO ([PRIMARY]);
CREATE PARTITION SCHEME psVeryPrepared AS PARTITION pfVeryPrepared ALL TO ([PRIMARY]);
CREATE PARTITION SCHEME psLudicrous AS PARTITION pfLudicrous ALL TO ([PRIMARY]);
EXEC sys.sp_executesql
N'CREATE SCHEMA BareMinimum AUTHORIZATION dbo;';
EXEC sys.sp_executesql
N'CREATE SCHEMA Reasonable AUTHORIZATION dbo;';
EXEC sys.sp_executesql
N'CREATE SCHEMA VeryPrepared AUTHORIZATION dbo;';
EXEC sys.sp_executesql
N'CREATE SCHEMA Ludicrous AUTHORIZATION dbo;';
CREATE TABLE BareMinimum.BareMinimum(LogDate datetime) ON psBareMinimum(LogDate);
CREATE TABLE Reasonable.Reasonable(LogDate datetime) ON psReasonable(LogDate);
CREATE TABLE VeryPrepared.VeryPrepared(LogDate datetime) ON psVeryPrepared(LogDate);
CREATE TABLE Ludicrous.Ludicrous(LogDate datetime) ON psLudicrous(LogDate);
INSERT BareMinimum.BareMinimum(LogDate) VALUES('2023-01-01T06:00:00'),('2023-01-01T12:00:00'),('2023-01-01T18:00:00'),('2023-01-02T06:00:00'),('2023-01-02T12:00:00'),('2023-01-02T18:00:00'),('2023-01-03T06:00:00'),('2023-01-03T12:00:00'),('2023-01-03T18:00:00'),('2023-01-04T06:00:00'),('2023-01-04T12:00:00'),('2023-01-04T18:00:00'),('2023-01-05T06:00:00'),('2023-01-05T12:00:00'),('2023-01-05T18:00:00'),('2023-01-06T06:00:00'),('2023-01-06T12:00:00'),('2023-01-06T18:00:00'),('2023-01-07T06:00:00'),('2023-01-07T12:00:00'),('2023-01-07T18:00:00'),('2023-01-08T06:00:00'),('2023-01-08T12:00:00'),('2023-01-08T18:00:00'),('2023-01-09T06:00:00'),('2023-01-09T12:00:00'),('2023-01-09T18:00:00'),('2023-01-10T06:00:00'),('2023-01-10T12:00:00'),('2023-01-10T18:00:00'),('2023-01-11T06:00:00'),('2023-01-11T12:00:00'),('2023-01-11T18:00:00'),('2023-01-12T06:00:00'),('2023-01-12T12:00:00'),('2023-01-12T18:00:00'),('2023-01-13T06:00:00'),('2023-01-13T12:00:00'),('2023-01-13T18:00:00'),('2023-01-14T06:00:00'),('2023-01-14T12:00:00'),('2023-01-14T18:00:00'),('2023-01-15T06:00:00'),('2023-01-15T12:00:00'),('2023-01-15T18:00:00'),('2023-01-16T06:00:00'),('2023-01-16T12:00:00'),('2023-01-16T18:00:00'),('2023-01-17T06:00:00'),('2023-01-17T12:00:00'),('2023-01-17T18:00:00'),('2023-01-18T06:00:00'),('2023-01-18T12:00:00'),('2023-01-18T18:00:00'),('2023-01-19T06:00:00'),('2023-01-19T12:00:00'),('2023-01-19T18:00:00'),('2023-01-20T06:00:00'),('2023-01-20T12:00:00'),('2023-01-20T18:00:00'),('2023-01-21T06:00:00'),('2023-01-21T12:00:00'),('2023-01-21T18:00:00'),('2023-01-22T06:00:00'),('2023-01-22T12:00:00'),('2023-01-22T18:00:00'),('2023-01-23T06:00:00'),('2023-01-23T12:00:00'),('2023-01-23T18:00:00'),('2023-01-24T06:00:00'),('2023-01-24T12:00:00'),('2023-01-24T18:00:00'),('2023-01-25T06:00:00'),('2023-01-25T12:00:00'),('2023-01-25T18:00:00'),('2023-01-26T06:00:00'),('2023-01-26T12:00:00'),('2023-01-26T18:00:00'),('2023-01-27T06:00:00'),('2023-01-27T12:00:00'),('2023-01-27T18:00:00'),('2023-01-28T06:00:00'),('2023-01-28T12:00:00'),('2023-01-28T18:00:00'),('2023-01-29T06:00:00'),('2023-01-29T12:00:00'),('2023-01-29T18:00:00'),('2023-01-30T06:00:00'),('2023-01-30T12:00:00'),('2023-01-30T18:00:00'),('2023-01-31T06:00:00'),('2023-01-31T12:00:00'),('2023-01-31T18:00:00'),('2023-02-01T06:00:00'),('2023-02-01T12:00:00'),('2023-02-01T18:00:00'),('2023-02-02T06:00:00'),('2023-02-02T12:00:00'),('2023-02-02T18:00:00'),('2023-02-03T06:00:00'),('2023-02-03T12:00:00'),('2023-02-03T18:00:00'),('2023-02-04T06:00:00'),('2023-02-04T12:00:00'),('2023-02-04T18:00:00'),('2023-02-05T06:00:00'),('2023-02-05T12:00:00'),('2023-02-05T18:00:00'),('2023-02-06T06:00:00'),('2023-02-06T12:00:00'),('2023-02-06T18:00:00'),('2023-02-07T06:00:00'),('2023-02-07T12:00:00'),('2023-02-07T18:00:00'),('2023-02-08T06:00:00'),('2023-02-08T12:00:00'),('2023-02-08T18:00:00'),('2023-02-09T06:00:00'),('2023-02-09T12:00:00'),('2023-02-09T18:00:00'),('2023-02-10T06:00:00'),('2023-02-10T12:00:00'),('2023-02-10T18:00:00'),('2023-02-11T06:00:00'),('2023-02-11T12:00:00'),('2023-02-11T18:00:00'),('2023-02-12T06:00:00'),('2023-02-12T12:00:00'),('2023-02-12T18:00:00'),('2023-02-13T06:00:00'),('2023-02-13T12:00:00'),('2023-02-13T18:00:00'),('2023-02-14T06:00:00'),('2023-02-14T12:00:00'),('2023-02-14T18:00:00'),('2023-02-15T06:00:00'),('2023-02-15T12:00:00'),('2023-02-15T18:00:00'),('2023-02-16T06:00:00'),('2023-02-16T12:00:00'),('2023-02-16T18:00:00'),('2023-02-17T06:00:00'),('2023-02-17T12:00:00'),('2023-02-17T18:00:00'),('2023-02-18T06:00:00'),('2023-02-18T12:00:00'),('2023-02-18T18:00:00'),('2023-02-19T06:00:00'),('2023-02-19T12:00:00'),('2023-02-19T18:00:00'),('2023-02-20T06:00:00'),('2023-02-20T12:00:00'),('2023-02-20T18:00:00'),('2023-02-21T06:00:00'),('2023-02-21T12:00:00'),('2023-02-21T18:00:00'),('2023-02-22T06:00:00'),('2023-02-22T12:00:00'),('2023-02-22T18:00:00'),('2023-02-23T06:00:00'),('2023-02-23T12:00:00'),('2023-02-23T18:00:00'),('2023-02-24T06:00:00'),('2023-02-24T12:00:00'),('2023-02-24T18:00
4 rows affected