Sum value from every 4 months | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Sum value from every 4 months

excuse me, do you know the query to find the sum value from every 4 months?

9th Nov 2017, 4:38 AM
Himas Adin Nugroho
Himas Adin Nugroho - avatar
1 Answer
+ 9
Himas Adin Nugroho For example table with price and day columns will look like this. select sum(x.price) from dbo.price x where datediff(month,getdate(),x.day)=4
21st Sep 2018, 2:05 PM
r8w9
r8w9 - avatar