2022.07.30 01:13 PM
I'm trying aggregate the consumption values which are of type long int, by the meter id which I've stored as int too. But I'm getting an empty table when I run the command in the screenshot. Any idea on how I can fix this?
You are awesome!
2022.07.30 09:23 PM
2022.07.30 11:43 PM - edited 2022.07.30 11:44 PM
Your query is selecting the value (.:) function by mid. You need to apply sum on a column by mid to get an aggregation e.g.
show t:select sum column by mid from readings
Tel: +44 (0)28 3025 2242
Tel: +1 (212) 447 6700
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.