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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -