Hello. Not very good at sql so I need some help.
Have a table with three different columns, all hourly values. Looks like this.
Date Price Volume
Sat 01.01.2000 00:00 110 1500
Sat 01.01.2000 01:00 210 1000
Sat 01.01.2000 02:00 150 4000
And so on. I would like to sum the Price/Volume arithmetic values hour by hour to weeks and months like this:
110*1500=165000+110*1000=210000+150*4000=600000 = 975000. For a week it will be about 168 values and for a month about 744. I would then like to be able to divide that value with the sum of the Volume for those hours which comes to 1500+1000+4000= 6500
975000/6500= 150
Hope someone understands what I mean .
Have a table with three different columns, all hourly values. Looks like this.
Date Price Volume
Sat 01.01.2000 00:00 110 1500
Sat 01.01.2000 01:00 210 1000
Sat 01.01.2000 02:00 150 4000
And so on. I would like to sum the Price/Volume arithmetic values hour by hour to weeks and months like this:
110*1500=165000+110*1000=210000+150*4000=600000 = 975000. For a week it will be about 168 values and for a month about 744. I would then like to be able to divide that value with the sum of the Volume for those hours which comes to 1500+1000+4000= 6500
975000/6500= 150
Hope someone understands what I mean .