Forum Discussion
What do you think of thunks?
sql:
create temp table aa as
SELECT rowid old_rowid,*, max(`Value`) OVER (
ORDER BY rowid ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING
) AS group_max FROM RollingMax;
select * from aa;
//list max value of each range BETWEEN 2 PRECEDING AND 2 FOLLOWING
select Date,Value from aa where group_max=Value order by old_rowid;
//filter Value equal group_max
- PeterBartholomew1Jan 20, 2025Silver Contributor
I have seen your posts on the use of sql for calculations far from the simple extraction, filtering and joining of text from tables that I associate with scope for sql. What is not obvious to me is where the scripts are loaded, in particular within which app?
- peiyezhuJan 21, 2025Bronze Contributor
Online App and command line shell.
- PeterBartholomew1Jan 21, 2025Silver Contributor
Thank you. That was something I hadn't come across.
- peiyezhuJan 20, 2025Bronze Contributor
select Date,Value from (SELECT rowid old_rowid,*, max(`Value`) OVER (
ORDER BY rowid ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING
) AS group_max FROM RollingMax) where group_max=Value order by old_rowid;
2 lines merge to one row