You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何基于子查询结果比较列,获取同ID下sequence更大的记录?

数据查询需求与示例

现有数据表

idsequencedestination
21Johannesburg
22Durban
23Cape Town
31Queenstown
32East London
33Gqeberha

查询场景与期望结果

当在destination列中搜索值为Queenstown的记录时,期望得到如下结果:

idsequencedestination
32East London
33Gqeberha

需求说明

需获取与查询到的记录id相同,且sequence大于该记录sequence的所有数据。

内容的提问来源于stack exchange,提问作者Nic

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 13:52:49