Forum Discussion

Nickcru's avatar
Nickcru
Level 2
6 years ago

EV Discovery Accelerator SQL Query

Hi All

I'm trying to run a SQL query to get a List of all Cases created in DA.  But I need the following fields:

Case Name, Case Owner, Creation Date ,Case Status and Number of hits per case

I'm Not sure how to add the Case Owner and the number of hits to the query below,

SELECT tc.[Name] AS 'CaseID',
tc.CaseID AS 'CaseNumber',
ts.name 'CaseStatus',
tp.PrincipalName AS 'Owner'

FROM tblIntSearches tis
JOIN tblCase tc ON tc.CaseID = tis.CaseID
JOIN tblPrincipal tp ON tp.PrincipalID = tc.OwnerPrincipalID
JOIN tblStatus ts ON tc.StatusID = ts.StatusID
GROUP BY tc.Name,tc.CaseID,tp.PrincipalName, ts.name

if someone can assist or just point me in the right direction ....

Thanks

No RepliesBe the first to reply