Skip to content
Advertisement

SQL query for customer and order- profit data

I am trying to write a query. I have 2 table in first table customer and 2018, 2019 order and profit data. In second table customer and 2020 0rder and profit data.

I want to write a query that will return all customer and their order and profit in a different format.

I have attached the screenshot of data and output.

enter image description here

Advertisement

Answer

use full outer join

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