I work with SQL 2008. So I have two tables:
Product(maker, model, type);Printer(code, model, color, type, price). "Model" is a foreign key for Printer. "Color" in table Printer may be "y" or "n". So I need Find the makers of the cheapest color printers. Result set: maker, price.
My query is:
select P.maker, Pr.price from printer pr
left join product p on p.model = pr.model
where pr.color='y' and pr.price=(select min (price) from Printer where color = 'y')
But the compiler writes me something like that:
Your query produced correct result set on main database, but it failed test on second, checking database.
* Wrong number of records (more by 2)
This exercise has
What can I do with my query? What
View Complete Post