Admin
Administrator
Joined: 22 Jun 2009
Posts: 27
Read: 0 topics
Warns: 0/5
|
Posted: Fri 12:53, 08 Dec 2017 Post subject: moje kody SQL æwiczeniowe |
|
|
Product(maker, model, type)
PC(code, model, speed, ram, hd, cd, price)
Laptop(code, model, speed, ram, hd, screen, price)
Printer(code, model, color, type, price)
Get the models and prices for all commercially available products (of any type) produced by maker B.
select product.model, pc.price
from (product inner join pc on product.model=pc.model)
where maker='B'
union
select product.model, laptop.price
from (product inner join laptop on product.model=laptop.model)
where maker='B'
union
select product.model, printer.price
from (product inner join printer on product.model=printer.model)
where maker='B'
The post has been approved 0 times
|
|