cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1149
Views
10
Helpful
3
Replies

UCCE 11.0 SQL Query MaxAgents with Multiple PG's

kmdurrett
Level 1
Level 1

Hey Guys,

Looking for some help with a query.  Can i get some help with a query that will provide the MaxNumberLoggedOnAgentsToHalf results for a specific time period that combines multiple PG's into one output?  The query i'm running now will only provide per peripheral but i need these combined and not individual outputs.  I've tried specifying the PeripheralID and using UNION but that just results in providing the results in separate outputs and not combined.  For example so the results of half hour add PG1, PG2, PG3 etc into total max agents logged in for that half.

 

SELECT DbDateTime,MaxNumberLoggedOnAgentsToHalf FROM dbo.Peripheral_Half_Hour where DateTime > '11/01/2018' and DateTime < '11/30/2018' and PeripheralID like '%'

 

Thank you,

Kurtis

1 Accepted Solution

Accepted Solutions

try the below query.

SELECT DateTime,SUM(MaxNumberLoggedOnAgentsToHalf) MaxNumberLoggedOnAgentsToHalf FROM dbo.Peripheral_Half_Hour where DateTime between '2019-02-13 1:01'and '2019-02-13 15:30' and PeripheralID like '%'
GROUP BY DateTime
Regards,
Ram.S

View solution in original post

3 Replies 3

try the below query.

SELECT DateTime,SUM(MaxNumberLoggedOnAgentsToHalf) MaxNumberLoggedOnAgentsToHalf FROM dbo.Peripheral_Half_Hour where DateTime between '2019-02-13 1:01'and '2019-02-13 15:30' and PeripheralID like '%'
GROUP BY DateTime
Regards,
Ram.S

Thanks, that's perfect!!