Table messages:
| conv_id | user_id | content | sent_time |
|---|---|---|---|
| 1 | 001 | 1st_msg | 01-01-1990 00:00:00 |
| 2 | 002 | 2nd_msg | 02-01-1990 00:00:00 |
How do we select the first message and the first reply sent in a conversation (conv_id) every day?
Notes:
- There can be many users.
- A single user can send multiple messages.
- This is a dataset of people, and only two people are chatting with each other.
- Throughout the day, multiple messages get exchanged.
- First message can be defined by the minimum sent time within day 1 of the first user.
- First reply can be defined as the minimum sent time within day 1 of the second user.
sent_time? Whyid = 1twice? Please [edit] your question to clarify. – Erwin Brandstetter Jun 24 '22 at 00:09conv_idto be part of the same conversation? – Erwin Brandstetter Jun 24 '22 at 03:20CREATE TABLEstatement) showing data types and constraints would be instrumental. – Erwin Brandstetter Jun 24 '22 at 03:34