Forum

Can anyone help me ...
 
Notifications
Clear all

Can anyone help me to rewrite this query? It works well with MySQL but not in snowflake db


Chetan
Posts: 2
 Chetan
Topic starter
(@Chetan)
Joined: 1 year ago

select t1.*
from ISSUES t1
         left join ISSUE_HISTORY t2
                   on t1.ID in (select distinct ISSUE_ID
                                from ISSUE_HISTORY
                                where t1.ID = t2.ISSUE_ID);

 

Error: [42601][2031] SQL compilation error: Unsupported subquery type cannot be evaluated

 

1 Reply
Chetan
Posts: 2
 Chetan
Topic starter
(@Chetan)
Joined: 1 year ago

Can you try this one and let me know? 

1. select t1.*
from ISSUES t1
left join ISSUE_HISTORY t2
on t1.ID in t2.(select distinct ISSUE_ID
from ISSUE_HISTORY t2
where t1.ID = t2.ISSUE_ID);

Reply
Share: