I wrote 2 queries and I am not sure what is wrong with them.

Can someone tell me what to do in order to fix them?

select sum( quantity ) * (select price from fruit where name like 'apple')
from inventory
where fruitID=(select fruitID from fruit where name like 'apple');

select price*sum( quantity ) from fruit as f, inventory as i where f.fruitID = i.fruitID group by i.fruitID;

hmmmm, i think i forgot about that thread... let me read it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.