I thought this would be simple, but I’m struggling (might be Friday brains)
I have a table:
Staff department job_date job Hours --------------------------------------------------------------- Chris Software 2011-03-02 Writing Code 3 Chris Software 2011-03-04 Holiday 7 Bob QA 2011-03-02 Testing 4 Frank Design 2011-03-11 Meeting 1
Now, I need a query that will “group” the results by day, based on whats in the job field, ie.. So I get a sum of hours spent per employee doing work and also for holidays:
Resultset:
Staff Worked Hours Holiday Hours Department --------------------------------------------------------------- Chris 3 7 Software Bob 4 0 QA Frank 1 0 Design --------------------------------------------------------------- Total 8 7
Thanks for any help you can give!
Chris
1 Answer