Why am I getting this error?
An error occurred while checking the query syntax. Errors: Invalid column name 'Id'.
SELECT
(L.Id) as 'SubscriberKey',
L.ID__c as 'ID_C',
L.Email as 'EmailAddr',
L.Gender__c as 'Gender',
L.Count_ID as 'Count_ID'
from (
select
(T.Id) as 'SubscriberKey',
T.ID__c as 'ID_C',
T.Email as 'EmailAddr',
T.Gender__c as 'Gender',
row_number() over (order by T.CreatedDate desc) as 'Count_ID'
from ent.Lead_Salesforce T
WHERE
T.Email <> ''
and T.Email is not null
and (T.ID__c<>' ' or T.ID__c Is NOT Null)
) L
I'm trying to imitate AUTO_INCREMENT
using row_number()