www.lefty.fora.pl Forum Index

 moje kody SQL æwiczeniowe

View previous topic :: View next topic
Post new topic   Reply to topic
Author Message
Admin
Administrator



Joined: 22 Jun 2009
Posts: 27
Read: 0 topics

Warns: 0/5

PostPosted: 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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.lefty.fora.pl Forum Index -> Autographs All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


fora.pl - za³ó¿ w³asne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2005 phpBB Group
gGreen v1.3 // Theme created by Sopel & Programosy
Regulamin