scottyjohn
Technical User
Hi all,
I have the following query which returns the values from a view grouped by hour....
SELECT (Left([STARTT],2) & ":00" & "-" & Left([STARTT],2)+1) & ":00" AS [HOUR], Count(SOFTPHONE.BRAND) AS CountOfBRAND1
FROM SOFTPHONE
WHERE (((SOFTPHONE.DIRECTION)="I") AND ((SOFTPHONE.STARTD)="19/03/2006"))
GROUP BY (Left([STARTT],2) & ":00" & "-" & Left([STARTT],2)+1) & ":00";
Which displays.....
HOUR CountOfBRAND1
----------------------------------------
07:00 - 08:00 348
08:00 - 09:00 295
This works fine, but this shows all calls regardless of brand. There are maybe 5 different possibilities for Brand and I would like to return the following table if possible?
HOUR CALLS FOR BRAND1 CALLS FOR BRAND2
----------------------------------------------------
07:00 - 08:00 348 285
08:00 - 09:00 295 321
Can this be done?
John
I have the following query which returns the values from a view grouped by hour....
SELECT (Left([STARTT],2) & ":00" & "-" & Left([STARTT],2)+1) & ":00" AS [HOUR], Count(SOFTPHONE.BRAND) AS CountOfBRAND1
FROM SOFTPHONE
WHERE (((SOFTPHONE.DIRECTION)="I") AND ((SOFTPHONE.STARTD)="19/03/2006"))
GROUP BY (Left([STARTT],2) & ":00" & "-" & Left([STARTT],2)+1) & ":00";
Which displays.....
HOUR CountOfBRAND1
----------------------------------------
07:00 - 08:00 348
08:00 - 09:00 295
This works fine, but this shows all calls regardless of brand. There are maybe 5 different possibilities for Brand and I would like to return the following table if possible?
HOUR CALLS FOR BRAND1 CALLS FOR BRAND2
----------------------------------------------------
07:00 - 08:00 348 285
08:00 - 09:00 295 321
Can this be done?
John