Customer support time in SQL
Write a query to get the response time per email (id) sent to email@example.com. Do not include ids that did not receive a response from firstname.lastname@example.org. Assume each email thread has a unique subject. Keep in mind a thread may have multiple responses back-and-forth between email@example.com and another email address.
|1||Support firstname.lastname@example.orgemail@example.com||2021-07-01 00:00:00|
|2||Support firstname.lastname@example.orgemail@example.com||2021-07-02 00:00:00|
|3||Info firstname.lastname@example.orgemail@example.com||2021-07-03 00:00:00|
|4||General firstname.lastname@example.orgemail@example.com||2021-07-04 00:00:00|
|5||Support firstname.lastname@example.orgemail@example.com||2021-07-05 00:00:00|
|6||Support firstname.lastname@example.orgemail@example.com||2021-07-06 00:00:00|
|7||Support firstname.lastname@example.orgemail@example.com||2021-07-07 00:00:00|
You can view/query this table in an interactive SQL fiddle here.
Subscribe to premium account to see the solution.Get premium now