id 19 date 2007-11-02 14:07:15 projectID 6 tested 1 I have many rows like this with different dates and times and I want to output like this, where tested would be either 1 or 0 depending and I guess it would be sorted by week but my problem is that I don't know how to output this its very tricky I think mon - tested tue - tested wed - tested thur - tested fri - tested