Skip to content
Advertisement

Why did I sum the wrong result?

I’d like to have an advice for this SUM that doesn’t work as expected. I have to SUM data from the same day and display it in a table. I did a query like this:

This is the ‘simple’ one and it displays every single row, I have to put a SUM in it to make it show every day but SUM data from the same day.

These 2 rows must be shown as one: enter image description here

Can anyone give me any help to create this query?

Advertisement

Answer

if I understand correctly you can try this.

You can’t put multiparameter in SUM function.

When you use Aggregate function you need to add non-Aggregate columns inGROUP BY caluse.

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