SELECT pl_id,
distinct ON (store.store_ID),
in_user_id
FROM plan1.plan_copy_levl copy1
INNER JOIN plan1._PLAN_STORE store
ON copy1.PLAN_ID = store .PLAN_ID;
在Postgres服务器上运行此查询时,我收到以下错误..如何使用distinct子句..在上面的代码计划1是模式名称。
错误:语法错误,在“distinct”附近的第2行: distinct ON (store.store_ID),