You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR REPLACE TABLE u (
id VARCHAR NULL
);
CREATE OR REPLACE TABLE c (
id VARCHAR NULL,
encounter_id VARCHAR NULL,
person_id VARCHAR NULL,
client_code VARCHAR NULL,
what_fuck BOOLEAN NOT NULL, -- change to `what_fuck BOOLEAN NULL` or remove this column will be fine
payload VARIANT NULL
);
select
ids.id,
array_filter(array_agg(case when px.payload is not null and px.payload:px_code_set <> 'CPT' then px.payload:px_key else null end),x-> x is not null) as px_payload
from u ids
left join c px on px.encounter_id = ids.id
group by ids.id;
error: APIError: QueryFailed: [1065]error:
--> SQL:3:139
|
1 | select
2 | ids.id,
3 | array_filter(array_agg(case when px.payload is not null and px.payload:px_code_set <> 'CPT' then px.payload:px_key else null end),x-> x is not null) as px_payload
| ^ column "x" must appear in the GROUP BY clause or be used in an aggregate function
The text was updated successfully, but these errors were encountered:
Summary
The text was updated successfully, but these errors were encountered: