List the names of all products from supplier ACME that use a USB-port (in any amount) List the names of products that use USB-ports or memory cards (in any amount) List the names of products that use USB-ports and memory cards (in any amount) List the names of products that do not use any USB-ports List the names of components that are used in two or more products (in any amount) List the names of products such that no component used in the product is more than $10 (per unit) List the names of components that are used in only one product. List the names of products that use USB-ports and memory-cards (in any amount) List the names of products that do not use any USB-ports. List the names of components that are used in two or more products (in any amount) List the name of the cheapest compound(s). Each compound is used (one or more) in a certain number of products. List the names of components that are used in the largest number of products, if they used at least twice (i. e. with an amount of two or more). Calculate the total weight of each product (note that unit-weight) per unit, and amount tells you how many of a component a product needs). Identify the product by name. List the names of products such that they do not include any of the cheapest components.
Your question image is not clear. I have to zoom in multiple times to view it.
I am giving you the solutions for the first four sql queries. Understanding them you will be able to write the relational ones.
List the names of products that use USB ports and memory cards
You have to use inner join here with all the tables and a condition for the component name
select * from product, component, uses where uses.pid=product.pid and uses.cid=component.cid and component.name in (\'USB\', \'Memory-cards\');
List the name of products that do not use any USB ports
select * from product, component, uses where uses.pid=product.pid and uses.cid=component.cid and component.name not in (\'USB\');
List the name of component that are used in 2 or more products
Group by the data on pid and check the count of the cid
select name from product where prodid in (select pid from uses group by pid having count(cid)>2)
List the name of the cheapest component
Just use Order-By clause here that will give you the cheapest component
select name from component order by cost;