The script below will provide fileids and tags applied by a particular user. You have to provide user name in the where clause.
SELECT * FROM
(
SELECT
th.Fileid AS FileId, t.TagName, fi.RelativeFilePath, th.DirectHit,
tal.TagOrUntagType, tal.TagedOrUntaggedFromModule, ui.UserName,
tal.TagAppliedDate AS ActionDateTime, rsi.Name AS ReviewSetName
FROM
tbl_ex_TagHistory th
INNER JOIN
tbl_ex_tag t
ON
th.Tagid = t.TagID
INNER JOIN
tbl_ex_FileInfo fi
ON
th.Fileid = fi.FileId
INNER JOIN
tbl_Ex_TagActionLog tal
ON
th.BatchID = tal.BatchID
AND th.Tagid = tal.TagID
LEFT JOIN
tbl_pj_userinfo ui
ON
tal.TagOrUntaggedBy = ui.UserID
LEFT JOIN
tbl_rev_ReviewBatch rb
ON
tal.ReviewBatchID = rb.BatchId
LEFT JOIN
tbl_rev_ReviewSetInfo rsi
ON
rb.ReviewSetId = rsi.ReviewSetId
) T
where UserName = 'super' --replace with your user names
ORDER BY FileId ASC, ActionDateTime DESC -- You can modify ordering, grouping, filtering etc. based on your need
Comments
0 comments
Please sign in to leave a comment.