Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Join issue

$
0
0

Hi Ibrahem,

 

use the following Queries, You will get the required output you want .

 

Actual and Plan Sales Via Showroom:

 

Select SHOWROOM, SUM("PLANNED_SALES"), Sum("ACTUAL_SALES")

FROM

(

SELECT PERIOD, SHOWROOM, PLANNED_SALES, NullAs ACTUAL_SALES

From CHILUKV.PLANNED_T P

UNION

SELECT PERIOD, SHOWROOM, NullAs PLANNED_SALES, ACTUAL_SALES

FROm CHILUKV.ACTUAL_T A

)

GroupBy SHOWROOM

ORDERBY SHOWROOM


temp.PNG



Actual and Plan Sales Via PERIOD:


Select PERIOD, SUM("PLANNED_SALES"), Sum("ACTUAL_SALES")

FROM

(

SELECT PERIOD, SHOWROOM, PLANNED_SALES, NullAs ACTUAL_SALES

From CHILUKV.PLANNED_T P

UNION

SELECT PERIOD, SHOWROOM, NullAs PLANNED_SALES, ACTUAL_SALES

FROm CHILUKV.ACTUAL_T A

)

GroupBy PERIOD

ORDERBY PERIOD


temp.PNG


Best Regards,

Muthu


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>