Использование секции INTERSECT
Листинг 4.47. Использование секции INTERSECT
booktown=# SELECT isbn FROM editions
booktown-# INTERSECT
booktown-# SELECT isbn FROM shipments
booktown-# GROUP BY isbn
booktown-# HAVING count(id) >
2;
isbn
039480001X
0394800753
0451160916
0590445065
0694003611
(5 rows)