Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
284 views
in Technique[技术] by (71.8m points)

sql server - Can someone help me understand why different results are coming for below query

Can someone help me understand why different results are coming IN SUM_BUDGET column for below queries :-

FIRST QUERY

select distinct (cntry),  SUM (B.BUDGET_SALES) AS SUM_BUDGET
from [publish].[LCM_COMMON_HNB_WEEKLY_ACTUAL] A 

left outer join ANALYSE.LCM_COMMON_BUDGET_SALES B
ON A.cntry=B.COUNTRY
AND A.week_commencing=B.WEEK_START_DATE
where A.week_commencing='04-01-2021'

group by cntry;

OUTPUT :-

cntry SUM_BUDGET
HK NULL
SG 7767135054.63
ID NULL
MO NULL
MY 12441719937.28
question from:https://stackoverflow.com/questions/66060638/can-someone-help-me-understand-why-different-results-are-coming-for-below-query

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...