Hi Marc, Welcome to Drill! Ok… let’s tackle this. Firstly, Drill uses more or less standard ANSI SQL This means that constants are escaped with single quotes, and fields are escaped with backpacks. Functions do not require the dollar sign. Thus… Try this:
SELECT SUM( `ID`) AS `F0`, COUNT(*) AS `F1` FROM `postgres`.`public`.`test` You have to specify the storage connector (in this case “Postgres”) before the schema and table. Note that this would be whatever you named your connection to Postgres, which could be anything. — C > On Oct 7, 2021, at 9:13 AM, Dark Attraction <[email protected]> wrote: > > Hi, > > I connected drill to postgres > if I run a query like that: > select avg(ID) from public.TEST > > I had this error message: > Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup > the SQL query. > > Sql: SELECT $SUM0("ID") AS "$f0", COUNT(*) AS "$f1" > FROM "public"."TEST" > > I run drill 1.19.0 on docker > > Marc
