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

UCCE 11.0 SQL Query MaxAgents with Multiple PG's

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

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: UCCE 11.0 SQL Query MaxAgents with Multiple PG's

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
3 REPLIES 3
Highlighted

Re: UCCE 11.0 SQL Query MaxAgents with Multiple PG's

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
Beginner

Re: UCCE 11.0 SQL Query MaxAgents with Multiple PG's

Thanks, that's perfect!!

Contributor

Re: UCCE 11.0 SQL Query MaxAgents with Multiple PG's

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards