答题过程中,可通过网络查询、电话咨询等方式获得帮助,但请不要让他人代答。
A集合:
[{begintime:2020-01-01 00:04:00,endtime:2020-01-01 00:06:00},
{begintime:2020-01-01 00:01:05,endtime:2020-01-01 00:03:15},
{begintime:2020-01-01 00:09:00,endtime:2020-01-01 00:10:00},
{begintime:2020-01-01 00:07:35,endtime:2020-01-01 00:08:40},
{begintime:2020-01-01 00:12:00,endtime:2020-01-01 00:17:00},
{begintime:2020-01-01 00:12:05,endtime:2020-01-01 00:13:10},
{begintime:2020-01-01 00:19:00,endtime:2020-01-01 00:21:00},
{begintime:2020-01-01 00:15:20,endtime:2020-01-01 00:20:45}]
期望得到的输出结果:
[{begintime:2020-01-01 00:01:05,endtime:2020-01-01 00:03:15},
begintime:2020-01-01 00:04:00,endtime:2020-01-01 00:06:00
begintime:2020-01-01 00:07:35,endtime:2020-01-01 00:08:40
begintime:2020-01-01 00:09:00,endtime:2020-01-01 00:10:00
begintime:2020-01-01 00:12:00,endtime:2020-01-01 00:21:00
即下表中红色标星的记录:
附:建表即创建如上测试数据的sql语句如下:
-- resulttable definition
CREATE TABLE `resulttable` (
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '姓名',
`subject` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '科目',
`mark` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '成绩'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='成绩表';
-- test data
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小明', '语文', '98');
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小花', '语文', '90');
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小强', '语文', '98');
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小明', '数学', '98');
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小花', '数学', '90');
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小强', '数学', '98');
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小明', '语文', '91');
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小花', '数学', '90');
INSERT INTO test_bao.resulttable (name, subject, mark) VALUES('小强', '英语', '98');
10题 | 被引用4次