10/03/2023 07:59 AM
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
10/03/2023 10:39 AM
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