There is a data column in my dataset called "date". The values look like this:
"2022-07-23 04:16:51 UTC"
I am trying to select rows from my table like this:
SELECT
date
type,
mid,
wikipediaUrl,
numMentions,
avgSalience
FROM
myTable,
UNNEST(entities)
WHERE type = "LOCATION" AND score < -0.1 AND (date BETWEEN DATE(current_date(), INTERVAL 40 DAY) AND current_date())
However, I get an error on the between function:
No matching signature for function DATE for argument types: DATE, INTERVAL. Supported signatures: DATE(TIMESTAMP, [STRING]); DATE(DATETIME); DATE(INT64, INT64, INT64); DATE(DATE); DATE(STRING) at [16:60]
What am I doing wrong?
