Exercise #7 page 1 |
||
Get the models and prices for all commercially available products (of any type) produced by maker B. The products in the database can be of three types: PCs, laptops, and printers. A natural way to solve this exercise is combining the three sets corresponding to each type of products. And here is the solution by one of our users:
This query returns the correct result for the main database, but terminates with the following error message when run against the checking database: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. In other words, we cannot compare a single value with the set that is returned if the maker B manufactures more than one model of any type - which is exactly the case for the checking database. |