【发布时间】:2021-07-19 01:00:16
【问题描述】:
行如下:
|id. |sender|receiver| type| content | time |
|------|------|--------|-----|-----------|------|
|uuid01| x| y| text| hello|time01|
|uuid02| y| z| text|how are you|time02|
|uuid03| y| x| text| haha|time03|
|uuid04| x| y|image| |time04|
如何将 x->y / y->x 合并为一个对话?如下:
|id |type | content | time |
|---|-----|-----------|------|
|x-y|image| |time04|
|y-z|text |how are you|time02|
【问题讨论】:
标签: sql postgresql greatest-n-per-group