2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS test1;
|
|
|
|
DROP TABLE IF EXISTS test2;
|
2018-07-16 16:31:34 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE test1(start Integer, end Integer) engine = Memory;
|
|
|
|
CREATE TABLE test2(start Integer, end Integer) engine = Memory;
|
2018-07-16 16:31:34 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO test1(start,end) VALUES (1,3),(3,5);
|
|
|
|
INSERT INTO test2(start,end) VALUES (3,5),(1,3);
|
2018-07-16 16:31:34 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT maxIntersections(start,end) from test1;
|
|
|
|
SELECT maxIntersections(start,end) from test2;
|
2018-07-16 16:31:34 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE test1;
|
|
|
|
DROP TABLE test2;
|