usershistory

 this is that query:


select u.username, uh.changelog as attribute_change, uh.updatedate as update_timestamp, uh.updatedby from usershistory uh join users u on uh.userkey = u.userkey where uh.updatedate > now() - interval 7 day order by uh.updatedate desc;

 

1. select u.username, uh.changelog as attribute_change, uh.updatedate as update_timestamp, uh.updatedby from usershistory uh join users u on uh.userkey = u.userkey where uh.updatedate > now() - interval 7 day order by uh.updatedate desc;

2. Further customized query, here's how maybe you can filter the logic:

select u.username, uh.changelog as attribute_change, uh.updatedate as update_timestamp, uh.updatedby, case when uh.changelog like '%customer%' then 'trigger first call' else 'trigger second call' end as update_action from usershistory uh join users u on uh.userkey = u.userkey where uh.updatedate > now() - interval 7 day order by uh.updatedate desc;

 

Comments

Popular posts from this blog

Enhanced Query - To Update Account Status and Name

Connection Config - STATUS_THRESHOLD_CONFIG

Email variables _ Register User