search
Log In
0 votes
131 views
Product(maker, model, type)

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

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

Printer(model, color, type, price)

Find the maker(s) of the PC(s) with the fastest processor among all those PC ’s that have the smallest amount of RAM

pls check if my SQL query is correct or not

select maker from Product where model IN(

                               select p.model from PC p where p.speed IN(

                                                                       select max(p1.speed) from PC p1 where p1.ram IN(

                                                                                                                   select MIN(p2.ram) from PC p2)))
in Databases
edited by
131 views

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
271 views
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 ... where speed>=3 AND count(distinct model)>=2 UNION select maker from Product NATURAL JOIN Laptop where speed>=3 AND count(distinct model)>=2
asked May 7, 2019 in Databases aditi19 271 views
1 vote
3 answers
2
257 views
Class(name, meets_at, room, fid) Faculty(fid, fname, deptid) Find the names of faculty members who teach in every room in which some class is taught
asked May 18, 2019 in Databases aditi19 257 views
3 votes
0 answers
3
345 views
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing is available in the database. D: ... executed. If Binary Search is used to locate a tuple in a relation using primary key, then what is the range of n?
asked Jan 31, 2018 in Databases Balaji Jegan 345 views
0 votes
0 answers
4
153 views
I got why query 2 is wrong. How do I approach to understand Query 1, is there a generic approach for solving questions like these which have no tables given?
asked Jan 8, 2019 in Databases amitqy 153 views
...