sql - LEFT JOIN FIlter -
if have 2 tables - table_a , table_b - , if using left join join them, how can filter rows table_b joined rows in table_a more once?
db flavor: teradata
if i'm not mistaken teradata supports window functions, might work:
select * ( select a.*, b.* count(*) on (partition a.mycol) cnt table_a left join table_b b on a.mycol = b.mycol ... -- conditions ) t cnt > 1 (not tested)
Comments
Post a Comment