Reputation: 301
Hello this is the query I am using to get data
SELECT *
FROM `nyc.a.ab`
WHERE name = 'HB'
AND TIME_ADD(CURRENT_TIME(), INTERVAL -5 minute)
LIMIT 5
I get this error
No matching signature for operator AND for argument types: BOOL, BOOL, TIME. Supported signature: BOOL AND ([BOOL, ...])
Can anyone tell me what am I doing wrong and how to fix the issue What Iam trying to accomplish to to get the last 5 mins of data
Upvotes: 0
Views: 701
Reputation: 1269483
The error seems pretty clear. You need a comparison:
WHERE name = 'HB' AND
TIME_ADD(CURRENT_TIME(), INTERVAL -5 minute) > <SOME TIME VALUE GOES HERE>
Upvotes: 2