COUNTER - by date

Hi guys - i am newer with grafana i am using influx .

Is possible i have one counter based in my target_date columm

I would like to compare those that are smaller than today’s date and sum

hostname packet status target_date

xxx java 1 04.04.2016
xxxx ssl 1 04.04.2016