样本数据:
{age: 20, ts: '00:00'},
{age: 20, ts: '00:01'},
{age: 30, ts: '00:00'},
{age: 30, ts: '00:01'},
{age: 40, ts: '00:00'},
{age: 40, ts: '00:01'},
{age: 40, ts: '00:02'}
预期产量:
[{age: 20, ts: '00:01'},
{age: 30, ts: '00:01'},
{age: 40, ts: '00:02'}]
尝试
SELECT * FROM c where c.age in (20, 30, 40) order by c.ts desc
但结果选择了所有的数据。
1条答案
按热度按时间qeeaahzv1#
请尝试以下操作:
这将产生以下输出: