Skip to content
Advertisement

Oracle SQL Filter common registries (1:1) between two tables

I need some help to approach a proper counting between 2 tables.

There are 2 tables with duplicated fields on each table. I need to filter same registries between these 2 tables but it must be counted only once per ID on both tables.

I was thinking about selecting by Distinct ID but still not getting the correct result.

The correct result should show only 4 rows:

https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=fb9cec42162a6a3a9bd3e1bea586ce99

Advertisement

Answer

Looks like you want a position matching

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement