gpt4 book ai didi

sql - postgres (w/timescaledb) order by 返回没有行

转载 作者:行者123 更新时间:2023-11-29 13:38:28 25 4
gpt4 key购买 nike

我有一种我不理解的行为。当我向查询添加 ORDER BY 子句时,它不再返回任何行

注意:事件是一个 timescaledb hypertable

SELECT "event"."id" AS "event_id",
"event"."value" AS "event_value",
"event"."timestamp" AS "event_timestamp"
FROM "event" "event"
WHERE event."customerId" = '8e3a1557-6f00-484d-828e-b57794bf54a7'
AND event."signalId" = 'c6c372f7-b6bd-4b19-9217-676accf723d3'

返回一行

但是如果我通过以下方式添加订单

SELECT "event"."id" AS "event_id",
"event"."value" AS "event_value",
"event"."timestamp" AS "event_timestamp"
FROM "event" "event"
WHERE event."customerId" = '8e3a1557-6f00-484d-828e-b57794bf54a7'
AND event."signalId" = 'c6c372f7-b6bd-4b19-9217-676accf723d3'
ORDER BY "event"."timestamp" DESC

它不返回任何行!

我做错了什么?!

===========截图

enter image description here

Image of 0 result queries

enter image description here

最佳答案

这是 timescaledb 与 1.4.0(可能更早)的问题升级到 1.4.1 及更高版本解决了这个问题

关于sql - postgres (w/timescaledb) order by 返回没有行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58943196/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com