Sunteți pe pagina 1din 1

Type 12 query Which product name, quantity and color have the highest quantity?

SELECT name, color, quantity FROM product WHERE quantity IN (SELECT Max(quantity) FROM product) Results: Baseball cap black 112.

Type 12 query What is the birthday of the youngest employee ( provide the name and the birthday) select emp_fname, emp_lname, birth_date from employee where birth_date in (select max(birth_date) from employee) results: Michael Lynch 1973-01-18. Type 11 query Which product name has a price of either $9.00 or $10.00 but not both select name from product where (unit_price=9.00 or unit_price =10.00) and not name in ( select p1.name from product p1, product p2 where p1.name = p2.name and p1.unit_price =9.00 and p2.unit_price = 10.00) results: Tee Shirts

S-ar putea să vă placă și