I have this sql function that works properly:
SELECT out_hum ,
(out_hum - LAG(out_hum, 1) OVER (ORDER BY id)) As dif
FROM excel_table
But I want to select all the out_hum when the diferrence (dif) is equal to 0 or grater than a value. When I type this code I get an error...
SELECT out_hum ,
(out_hum - LAG(out_hum, 1) OVER (ORDER BY id)) As dif
FROM excel_table WHERE dif=0
How I can solve this?