SQL definitely has weaknesses, but I wish people wouldn't use "straw man" examples to crap all over it. The flux example from his blog post would look something like this:
select
lag(value, 0) over recent * 1 +
lag(value, 1) over recent * 0.5 +
lag(value, 2) over recent * 0.25 +
... as exp_moving_avg
from telegraph
where time > datetime_sub(current_datetime(), interval 1 hour)
and measurement = 'foo'
window recent as (order by time rows 10 preceding)
Here, the main difference between flux is that flux has a built-in exponential moving average function, whereas in SQL we have to actually write out the formula.