![](https://secure.gravatar.com/avatar/848f91d0b7b078103d5a097ed645abb9.jpg?s=120&d=mm&r=g)
20 Oct
2017
20 Oct
'17
8:46 p.m.
Hi, all. I'm trying to figure out the proper syntax for queries such as a moving average over a window in MonetDB.
THis works:
sql>select avg(energy) from TABLENAME; +--------------------------+ | L3 | +==========================+ | 658.5049567388747 | +--------------------------+
This fails:
select avg(energy) OVER () from TABLENAME; SELECT: function 'avg' not found
(Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2017-SP1) Database: MonetDB v11.27.5 (Jul2017-SP1), 'mapi:monetdb://SERVER2:50000/scada' )
How do I write such a query?
Many thanks.