The following query is designed to create an attendance history for each pupil in a given class. The Pupil table contains IDs, names and academic details, while the Register table has only four columns: ID, StudentID, Time (Datetime) and Present (bit). On its own the table works fine and casts the bit values as ints, so I get:The following query is designed to create an at