Neoview SQL Reference Manual (R2.5)
The SELECT statement using this inner query yields these results. All of the order numbers
listed have part number equal to any part number with more than five total units in
stock—that is, equal to 2403, 5100, 5103, 6301, 6500, and so on:
SELECT ordernum, partnum, qty_ordered
FROM sales.odetail
WHERE partnum = ANY (SELECT partnum
FROM sales.odetail
WHERE qty_ordered > 5);
Order/Num Part/Num Qty/Ord
---------- -------- ----------
100210 244 3
100210 2001 3
100210 2403 6
100210 5100 10
100250 244 4
100250 5103 10
100250 6301 15
100250 6500 10
...... .... ..
--- 71 row(s) selected.
300 SQL Language Elements