I have a table named "conversations" and it holds data like this: TIMESTAMP | ACTOR| CONTEXT| MESSAGE | CLASSIFICATION -----------------+------+--------+------------+----------- 01.02.2015 09:38 | user | text | blablabla | normal 01.02.2015 09:46 | bot | text | blablabla | normal 01.02.2015 10:19 | user | text | hi bot! | opening 01.02.2015 10:20 | bot | text | blablabla | normal 01.02.2015 10:21 | user | text | blablabla | normal 01.02.2015 10:22 | bot | text | blablabla | normal 01.02.2015 10:23 | user | text | ok bye bot | closing 01.02.2015 11:53 | bot | text | blablabla | normal 01.02.2015 12:14 | user | text | goodbye | closing 01.02.2015 12:33 | bot | text | blablabla | normal 01.02.2015 12:51 | bot | text | blablabla | normal What I want to SELECT is the range between 'openings' and 'closings' in my dataset in order to separate successfully framed conversations from all other user inputs / bot outputs. The expected output would be: TIMESTAMP | ACTOR| CONTEXT| MESSAGE | CLASSIFICATION -----------------+------+--------+------------+----------- 01.02.2015 10:19 | user | text | hi bot! | opening 01.02.2015 10:20 | bot | text | blablabla | normal 01.02.2015 10:21 | user | text | blablabla | normal 01.02.2015 10:22 | bot | text | blablabla | normal 01.02.2015 10:23 | user | text | ok bye bot | closing Do you have any suggestions of how to query my dataset in order to receive the output above? Thanks and best wishes. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] Select data from range between conversational openings and closings (chat log analysis using SQL / H2 Database)
'Henning Mayer' via H2 Database Wed, 13 Sep 2017 03:27:56 -0700
- [h2] Select data from range between conver... 'Henning Mayer' via H2 Database
- [h2] Select data from range between c... Adam McMahon
