Where clause not working as expected

Hi All !
How do I select out of that query only the results that has value/diffrence > 0

I would expect that this would work

SELECT difference(last("value")) FROM "count_cars" WHERE "value" > 0 GROUP BY time(1h) fill(none)

Bu the result is the following:

   name:"count_cars"
    columns:Array[2]
    0:"time"
    1:"difference"
    values:Array[5]
    0:Array[1594029600000,2]
    1:Array[1594033200000,0]
    2:Array[1594036800000,-2]
    3:Array[1594040400000,0]
    4:Array[1594044000000,0]

Looks like the column name is diffrence but that will not work either. WHERE “diffrence” > 0 will not not get any rows back. I only need rows when the value/diffrence is non zero.
TIA

Not sure if this would do it, but in sql you would have a name following your initial calculation and you would reference that name in your where clause, that name represents the result of the calculation, not the field value “value” that you are now referencing in your where clause.

In the influxQL you need the word “as” between the calculation and it’s applied name, as in (looks like this is a variable font so it doesn’t align visually but it will within the influx client CLI:

select count(value) as valuCount from ;
name:
time valuCount


1970-01-01T00:00:00Z 19800