Подскажите, пожалуйста, почему это утверждение неверно, оно дает мне ошибку, что оно ожидало чего-то другого вместо фразы случая
SELECT ACT.Employee_Id,
case when max( case when not ACT.ActivityTime_Date like '2019-09-%' and ACT.Activity_Time_Date not like '09/%/2019' and
not (ACT.Action like 'ACTIVITY_create_%' or ACT.Action like 'ACTIVITY_update_%') and
not ACT.Destination_ObjectType in ('announcement', 'attachment'
,'blog','blogpost','community', 'directmessage', 'document', 'event', 'idea', 'message', 'poll', 'project', 'question',
'socialgroup', 'task', 'thread', 'video', 'wallentry')) then 1 else 0
END)=0
then 'Contributor'
from Analytics.ConnectTodayActive ACT;
Это ошибка
SQL Editor 1: Encountered "case when max ( case when not ( ACT . ActivityTime_Date like \'2019-09-%\' or ACT . ActivityTime_Date like \'09/%/2019\' ) and not ( ACT . Action like not.
Was expecting one of:
"column" ...
"row" ...
"transactiontime" ...
"validtime" ...
"(" ...
"until_changed" ...
"until_closed" ...
<NAME> ...
"sampleid" ...
"interval" ...
"date" ...
"time" ...
"timestamp" ...
"begin" ...
"end" ...
"next" ...
<SINGLE_STRING_LITERAL> ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
":" ...
"?" ...
<NAMED_QUESTIONMARK> ...
"@" ...
"null" ...
"user" ...
"current_role" ...
"current_user" ...
"session" ...
"account" ...
"database" ...
"role" ...
"profile" ...
"zone" ...
"td_host" ...
"td_authid" ...
"new" ...
"current_date" ...