Correct Syntax for AEP Query - Counts
Hello,
I'm trying to get a count of all the profiles on my dataset where the DOB is less than 21 years old from the Current Date. I'm trying to use the following syntax in the Query service but get an error:
SELECT
person.birthDate AS birthDate,
COUNT(1) eventCount
FROM
dataset_aep_coreprofile
WHERE
DATE_ADD (YEAR, 21, person.birthDate) > CURRENT_DATE;
GROUP BY
person.birthDate
ErrorCode: 42703 queryId: 9be3e30e-29df-49a9-b78e-06eb65e0cf73 Column YEAR does not exist.
I'm having a hard time understanding what SQL this service is using. Example: I'm used to using GETDATE() but I have to use CURRENT_DATE in this query.
Please advise.