add batch
remove batch
split batch
comment selection
show hidden batches
hide batch
highlight batch
db<>fiddle
Db2
Firebird
MariaDB
MySQL
Node.js
Oracle
Postgres
SQLite
SQL Server
TimescaleDB
YugabyteDB
Developer-C 11.1
3.0
4.0
10.2
10.3
10.4
10.5
10.6
10.7
10.8
10.9
5.5
5.6
5.7
8.0
18
11g Release 2
18c
21c
23c
8.4
9.3
9.4
9.5
9.6
10
11
12
13
14
15
16
3.8
3.16
3.27
3.39
2012
2014
2016
2017
2017 (Linux)
2019
2019 (Linux)
2022
2.11
2.6
2.8
2.18
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
Sakila
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
no sample DB
AdventureWorks
no sample DB
no sample DB
AdventureWorks
no sample DB
no sample DB
no sample DB
no sample DB
run
markdown
donate
feedback
about
By using db<>fiddle, you agree to license everything you submit by
Creative Commons CC0
.
CREATE TABLE `bot_talk` ( `id` bigint NOT NULL AUTO_INCREMENT, `created_date` datetime NOT NULL, `client_session_id` varchar(100) CHARACTER SET latin1 NOT NULL, `origin_url` varchar(255) CHARACTER SET latin1 DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UC_PRE_CHAT_TALKID_COL` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
insert into bot_talk (created_date, origin_url, client_session_id) values ('2021-01-18 11:02:24.0', 'https://chat-app.esteeez.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:02:35.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:11:03.0', 'https://chat-app.esteeez.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:44:28.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:49:36.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:51:05.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:51:15.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:51:19.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:51:43.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 11:51:50.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii'); insert into bot_talk (created_date, origin_url, client_session_id) values ('2021-01-18 12:01:24.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 12:04:48.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 13:40:50.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 15:54:38.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 15:54:45.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 15:55:08.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 15:58:07.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 15:58:11.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 15:59:56.0', 'https://testeurlteste1502211068.zendesk.com/', 'znkjoc3gfth2c3m0t1klii') , ('2021-01-18 16:08:32.0', 'https://admin.esteeez.com/', 'znkjoc3gfth2c3m0t1klii') ;
select count(*), client_session_id, GROUP_CONCAT(id) as talkIds, origin_url from bot_talk where created_date > now() - interval 60 second group by client_session_id, origin_url having count(*) >= 3
count(*)
client_session_id
talkIds
origin_url