03/20/2023
03:52 AM
- last edited on
03/20/2023
09:09 AM
by
Dave
Hi Team,
This query i used to find the count of usernames who are updated within today. This is showing the result perfectly if i updated the users through UI. But when i tried updating users through CSV the result is not increasing. My intension is this query should show the count of usernames which are updated today when i update through UI and CSV.
But this is working only UI but not CSV.
When i tried updating users through CSV the result is not increasing
please does any have solution for this or any idea.
please let me know.
select distinct now()
as 'Report Run Date Time',b.employeetype,count(b.username) as 'Count of Updated Users' from users b where DATEDIFF(now(),b.UPDATEDATE) < 1 and b.STATUSKEY =1 AND b.EMPLOYEEID IS NOT NULL AND b.employeetype in ('BeSEE','US Vendor','DA Vendor') group by b.employeetype
[This post has been edited by a Moderator to consolidate information.]
03/20/2023 01:14 PM
You can leverage the usershistory table to know the information of the users updated from UI/CSV and use join with the user's table.
- Users.userkey = usershistory.userkey column
- Column for modified timestamp in usershistory = updatedate
Note: usershistory table is not accessible from Data Analyzer but will work in Analytics.
03/20/2023 07:59 PM
Does user history tab gets updated while doing user import via csv
03/21/2023 12:11 AM
Yes when i update the user details from UI/CSV the details is showing in the update history tab.
03/21/2023 12:54 AM
Hi @sahil
Is this the query to use instead of upone.
select distinct now() as 'Report Run Date Time', b.employeetype, DATE(a.UPDATEDATE) as 'UserUpdateDate',count(b.username) as 'Count of Users' from usershistory a,users b where DATEDIFF(now(),a.UPDATEDATE) <= 1 and a.USERKEY = b.USERKEY AND b.STATUSKEY =1 AND b.EMPLOYEEID IS NOT NULL AND b.employeetype in ('BeSEE','US Vendor','DA Vendor') group by b.employeetype,UserUpdateDate;
03/21/2023 08:07 AM
Yes, you can use the query.