One option is tp use a CASE expression. This is not 100%, but something to get you going:SELECT staffclockin.staffid, SUM(CASE WHEN stafftypes.stafftype = 'Bartender' THEN TIMESTAMPDIFF(MINUTE,staffclockin.clockintime,staffclockin.clockouttime)/60) ELSE 0 END) AS Bartender, SUM(CASE WHEN stafftypes.stafftype = 'Manager' THEN TIMESTAMPDIFF(MINUTE,staffclockin.clockintime,staffclockin.clockouttime)/60) ELSE 0 END) AS Manager, ... SUM(staffclockin.tips) AS totaltips FROM staffclockin, stafftypesWHERE clockintime between "2012-01-01" and "2012-02-10" AND stafftypes.stafftypeid = staffclockin.stafftypeidGROUP BY staffclockin.stafftypeidORDER BY staffclockin.clockinid DESC