Hi I'd like to query a SQL dbo to get how many "tickets" were open(post-started and pre-resolved) within a 20 minute window of when the current rows "ticket" was created.

Goal Table (where 4 items were active from 8:50 to 9:10): 

```
ID   CreateDate         ConcurrentItems
123  12/1/2016 09:00        4

```

Something along the lines of:

```
SELECT   Ticket_ID as ID, Created_Date as CreateDate,
    Count( 
            WHERE
             WorkItemType = 'Work Request' AND
             IncidentStartTime <= (Created_Date minus 10 minutes) AND
             IncidentResolvedTime > (Created_Date plus 10 minutes)
     )as ConcurrentItems

FROM   CurrentView

```

Where the Created\_Date in the COUNT would be same as in the SELECT