string_to_array(string_agg(concat(t1.id,',',t2.id),','),',') :: array(bigint)
could be rewritten as
\narray_agg(concat(t1.id,',',t2.id)) :: array(bigint)
or could it not?
","upvoteCount":1,"url":"https://github.com/crate/crate/discussions/12197#discussioncomment-2336859"}}}-
I have a scenario where a subquery returns me an array of ids as below - select string_to_array(string_agg(concat(t1.id,',',t2.id),','),',') :: array(bigint) as ids Above query gives me expected result. But the problem is , _Error! I am already done trying Array Expressions etc. |
Beta Was this translation helpful? Give feedback.
-
Can you try with department.id = ANY(SELECT UNNEST(ids) FROM (t1, t2)) string_to_array(string_agg(concat(t1.id,',',t2.id),','),',') :: array(bigint) could be rewritten as array_agg(concat(t1.id,',',t2.id)) :: array(bigint) or could it not? |
Beta Was this translation helpful? Give feedback.
Can you try with
UNNEST
?could be rewritten as
or could it not?