Skip to content
Advertisement

Need to combine and get results

I’m trying to do the following:

I want to minus the amount of RMAs from Sales:

This is the query I did for Sales:

This is the one I did for RMAs:

I would like to take the results (let’s say 5000 sales and 3000 rma) and return a formatted result.

Can you please help? Thanks!!

Advertisement

Answer

You can jojn both subqueries, only the second can’t contain an ORDER VY or LIMIT, because teh first subquery defines the PRODUCT_SKU that are choosen to be in the result set.

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