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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -