gpt4 book ai didi

postgresql - 选择子查询在 Intellij 想法中不起作用

转载 作者:行者123 更新时间:2023-12-04 10:53:05 29 4
gpt4 key购买 nike

我有以下查询(假设表存在):

select tmp.ship_country 
from (
select o.ship_country, count (*) c
from orders o
group by o.ship_country
order by c desc limit 1
) tmp;

当我尝试通过 IntelliJ Idea Database Browser 运行它时,我收到以下错误:

Error executing SELECT statement: ERROR: subquery in FROM must have alias. HINT: For example, FROM (SELECT...) [AS] foo. Position: 30



PGADMIN4 执行时,相同的查询运行良好.以下是相关截图:

When executed from IntelliJ idea

Error Message In IntelliJ

Query Executed from PgAdmin 4

Correct Result in PgAdmin4

我是不是遗漏了什么,或者这是 Idea 中的一个错误? ?我正在使用 IntelliJ Idea 2019.3 (CE)。

CE having Database Navigator

最佳答案

可用于 IntelliJ IDEA Community Edition 的 Database Navigator Plugin 不再由 JetBrains 提供(不再提供),并且与 Ultimate Edition 提供的 DataGrip 扩展或 IDE 无关。

您面临的错误是 https://plugins.jetbrains.com/plugin/1800-database-navigator/ 中的一个错误插入。

我可以在当前版本中重现该错误 3.2.0564 .

创建问题:https://database-navigator.atlassian.net/browse/DBNB-33

关于postgresql - 选择子查询在 Intellij 想法中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59372477/

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