Ticket - 18:00 8:00-9:00 a.m. every morning, afternoon the two periods of the earliest a record as a "valid", in the two other clock period according to "repeat", or as a "invalid", the expected results are as follows:
The test data are as follows:
Create table T1119 (
UserId int,
The CheckIn DATETIME
);
Insert into T1119 VALUES (1, '2018/12/1 8:25 PM);
Insert into T1119 VALUES (1, '2018/12/1 sea');
Insert into T1119 VALUES (1, '2018/12/1 17:02');
Insert into T1119 VALUES (1, '2018/12/2 when');
Insert into T1119 VALUES (2, '2018/12/1 sea');
Insert into T1119 VALUES (2, '2018/12/1 17:03');
Insert into T1119 VALUES (2, '2018/12/1 17:29');
Insert into T1119 VALUES (2, '2018/12/1 18:01');
CodePudding user response:
This is the exam questions you