I have a requirement where i have to join my stage table to another table and if that join returns multiple rows or no match found then
i want to skip that row.
Select mtr_id from stage table a left outer join tableB b
on a.badge_num = b.badge_num (if there is no match found or multiple rows returned then i want to ignore that row).
"no match found" -> INNER join instead of LEFT
"multiple rows returned" -> QUALIFY COUNT(*) OVER (PARTITION BY a.badge_num) = 1