I have the following query (Assume that the tables are present):
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;
When I attempt to run this via IntelliJ Idea Database Browser
, I get following error:
Error executing SELECT statement: ERROR: subquery in FROM must have alias. HINT: For example,
FROM (SELECT...) [AS] foo
. Position: 30
The same query runs fine when executed from PGADMIN4
. Below are the associated screenshots:
Am I missing something or is this a bug in Idea
? I am using IntelliJ Idea 2019.3 (CE).
The Database Navigator Plugin available for IntelliJ IDEA Community Edition isn't provided by JetBrains (anymore) and has nothing to do with the DataGrip extension or IDE that is available with the Ultimate Edition.
The error you are facing is a bug in the https://plugins.jetbrains.com/plugin/1800-database-navigator/ plugin.
I could reproduce that bug with current release 3.2.0564
.
Created issue: https://database-navigator.atlassian.net/browse/DBNB-33