SELECT
[Period_Day],sum([Coefficient]) as Day_Coefficient
INTO #DS
FROM
(SELECT
[Period_Day]
,[Period_Num]
,AVG([Coefficient]) as [Coefficient]
FROM [PDM].[PROFILING].[REF_HH_DEFAULT_USAGE]
WHERE [Is_Current_Flg] = 1
GROUP BY [Period_Day],[Period_Num])A
GROUP BY [Period_Day]
Hi All,
I am trying to get the above nested Select statement to work but not having much luck. I have tried In-database as was as just input but struggling.
I have tried to import the data in and then do the steps in separate queries and then Join up later on but the numbers don't seem to come out correct.
can anyone suggest the best workaround that I may be able to test?