I wrote the same query as the subquery and self-join.
Is there an obvious argument for one over the other here?
subquery:
SELECT prod_id, prod_name FROM products WHERE vend_id = (SELECT vend_id FROM products WHERE prod_id = 'DTNTR');
auto join:
SELECT p1.prod_id, p1.prod_name FROM products p1, products p2 WHERE p1.vend_id = p2.vend_id AND p2.prod_id = 'DTNTR';
source share