I have such a difficult problem from my knowledge.
I need to write a sole query that perform this action:
write a query that for the day Monday extract the sum of computer sold, and for the rest of the days just the sum of Laptop.
For example I have this table
Day LaptopSold DesktopSold Total
Monday 2 2 4
Tuesday 2 3 5
Monday 1 1 2
Wednesday 2 2 4
Tuesday 1 4 5
The result should be this:
Day QtySold
Monday 6
Tuesday 3
wed 2
I can achieve the goal just writing two separate queries with the Group By
for the Day
field, but in one query for me is impossible!!!
Could you help me, please!!! Thanks in advance Lu