Advertisement
VladikOtez

n7

Jan 4th, 2017
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.34 KB | None | 0 0
  1. SELECT model, price FROM pc WHERE model IN (SELECT model FROM product WHERE TYPE= 'pc' AND maker= 'B')
  2. UNION
  3. SELECT model, price FROM laptop WHERE model IN (SELECT model FROM product WHERE TYPE= 'laptop' AND maker= 'B')
  4. UNION
  5. SELECT model, price FROM printer WHERE model IN (SELECT model FROM product WHERE TYPE= 'printer' AND maker= 'B')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement