INTERSECT ALL , , SO .
.
sqlfiddle.com, postgres 9.3.
, INTERSECT ALL . row_number() over ().
create table x (V1 numeric);
create table y (V1 numeric);
insert into x values (1),(2),(2),(2),(3),(4),(4);
insert into y values (2),(3),(4),(4),(4),(5);
EXCEPT [ALL] , .
select * from x except select * from y;
| v1
| 1
select * from x except all select * from y;
| v1
| 1
| 2
| 2
EXCEPT sql , , . , .
, , . . max(0, x.N - y.N).
, EXCEPT ALL, INTERSECT ALL, min(x.N, y.N) .
, , , : github.com/Rdatatable/data.table, , . data.table - C . 10 .