Not able to use status columns of accounts table or statuskey columns of users table

aibasu
New Contributor III
New Contributor III

Hi All , 

We have an urgent need to extract account status for a number of users to verify the offboarding process . But we are not able to use the status column of accounts for the same and it is throwing error . Can someone please help with this and let me know how can I use status column of Accounts table or statuskey column of users table ?

Thanks and Regards ,

Aishani Basu

1 REPLY 1

Sivagami
All-Star
All-Star

Analytics doesn't allow the usage of status column. Probably that's the reason for the error.

Use alias for your accounts table status column. Something like below.

select u.username,u.email,u.statuskey,a.name,a.status as 'AccountStatus' from users u left join user_accounts ua on u.userkey=ua.userkey left join accounts a on ua.accountkey=a.accountkey where u.statuskey=0;

-Siva