Currently i have this dataset, i need to return grouped ids that are within the range of 60 seconds and have more than 3.
CREATE TABLE test ( `id` bigint NOT NULL AUTO_INCREMENT, created_date TIMESTAMP(1) NOT NULL, origin_url VARCHAR (200) NOT NULL, client_session_id VARCHAR (50) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UC_PRE_CHAT_TALKID_COL` (`id`) );
✓
INSERT INTO test VALUES (1,'2021-01-18 11:02:24.0', 'https://zendes.com/', 'znkjoc3gfth2c3m0t1klii'), (2,'2021-01-18 11:02:35.0', 'https://zendes.com/', 'znkjoc3gfth2c3m0t1klii'), (3,'2021-01-18 11:02:03.0', 'https://zendes.com/', 'znkjoc3gfth2c3m0t1klii'), (4,'2021-01-18 11:11:28.0', 'https://rarara.com/', 'znkjoc3gfth2c3m0t1klii'), (5,'2021-01-18 11:11:36.0', 'https://rarara.com/', 'znkjoc3gfth2c3m0t1klii'), (6,'2021-01-18 11:11:05.0', 'https://rarara.com/', 'znkjoc3gfth2c3m0t1klii');
✓
db<>fiddle here
something like this:
ids origin_url client_session_id 1,2,3 https://testett.com/ znkjoc3gfth2c3m0t1klii 4,5,6 https://rarara.com/ znkjoc3gfth2c3m0t1klii