Subject Re: SV: [firebird-support] Another CTE question
Author Lester Caine
Svein Erling Tysvær wrote:
> SELECT "Date"
> , sum(Case when "Time" = '9.00' then "Issued" else 0 end) as "9:00"
> , sum(Case when "Time" = '9.25' then "Issued" else 0 end) as "9:15"
> , sum(Case when "Time" = '9.50' then "Issued" else 0 end) as "9:30"
> FROM Z
> GROUP BY 1

AH ... now that makes sense ... and I can expand it to include waiting time
easily enough ... Cheers!

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php