In fact, look at the return from q0 and q1 in this:
{
q0(func:has(hours.tracked),first:2) @filter(gt(hours.tracked,2019-01-01)){
hours.tracked
}
q1(func:has(hours.tracked),first:2) @filter(gt(hours.tracked,2020-01-01)){
hours.tracked
}
q2(func:gt(hours.tracked,2019-01-01),first:2){
hours.tracked
}
q3(func:gt(hours.tracked,2020-01-01),first:2){
hours.tracked
}
}
Gives:
{
"data": {
"q0": [
{
"hours.tracked": "2019-10-17T00:00:00Z"
},
{
"hours.tracked": "2019-10-24T00:00:00Z"
}
],
"q1": [],
"q2": [
{
"hours.tracked": "2020-01-15T00:00:00Z"
},
{
"hours.tracked": "2020-01-22T00:00:00Z"
}
],
"q3": [
{
"hours.tracked": "2020-01-15T00:00:00Z"
},
{
"hours.tracked": "2020-01-22T00:00:00Z"
}
]
},
"extensions": {
"server_latency": {
"parsing_ns": 365100,
"processing_ns": 37904400,
"encoding_ns": 39000,
"assign_timestamp_ns": 2104500,
"total_ns": 41061800
},
"txn": {
"start_ts": 774739
},
"metrics": {
"num_uids": {
"hours.tracked": 8
}
}
}
}
q0 has no 2020 entries, q1 nothing, q3 and q4 being what I would expect to get from q0 and q1.