hi all, im quit new in the buisness and i have a query and the result is value per day from 4 different samples. now in the same query i would like to add all the value on the same day and save as a new column name. can anyone help me finisch my query.
here is the result:
its a tagname day of the month and value
0200_P1511_TPV 27 762
0200_P1521_TPV 27 2492
0200_P3010_TPV 27 2927
0200_P3020_TPV 27 2337
this is the query that gives me this result:
DATEPART (DD, dateTimeColumn) AS day1,
SUM(CONVERT(float,valueColumn)) as value
where [dateTimeColumn] > '2019-05-19 08:00:00.000'
and ( [parameterColumn] = '0200_P1511_TPV'
or [parameterColumn] = '0200_P1521_TPV'
or [parameterColumn] = '0200_P3010_TPV'
or [parameterColumn] = '0200_P3020_TPV')
Group By DATEPART (Day, dateTimeColumn), [parameterColumn]
order by [day1] desc
Now I would like a new column where all the value of day 27 and all other days are summed up.
best regards, emilio
What I have tried:
What I have written in the problem description