1,667 views
0 votes
0 votes
Product(maker, model, type)

PC(model, speed, ram, hd, price)

Laptop(model, speed, ram, hd, screen, price)

Find those manufacturers of at least two different computers (PC’s or laptops) with speeds of at least 3.0

is my query correct?

select maker from Product NATURAL JOIN PC where speed>=3 AND count(distinct model)>=2

UNION

select maker from Product NATURAL JOIN Laptop where speed>=3 AND count(distinct model)>=2

1 Answer

1 votes
1 votes
Select maker from Product , PC, Laptop where $(PC.speed>=3)OR(Laptop.speed>=3)$ and count model$>=2$

Related questions

0 votes
0 votes
0 answers
3
aditi19 asked Nov 2, 2018
306 views
in case of outer join for combining two tables, if there is no common attribute does it returns cartesian product just like natural join does?
5 votes
5 votes
1 answer
4
Na462 asked Jun 14, 2018
4,248 views
Consider a relation r1(A, B, C), r2(C, D, E) and r3(F, G) with primary keys A, C and F respectively. Assume that r1 has 150 tupples, r2 has 100 tupples and r3 has 75 tupp...