Skip to content
Advertisement

Questions on aggregation

I am required to find the name of the product (iname) where total delivery quantity is equal to the total sales quantity

Two tables given are

I tried this code but the result I got is aggregated incorrectly because there are multiple sales and deliveries of the same item

When I do the following I was able to find the correct total quantity but is there a way I can do this in one code?

Advertisement

Answer

You can try below –

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement