如果我有如下表格:
Date Name Number Period1 Period2 Period3
-------------------------------------------------------
23-Oct Barry 453 NULL NULL Room 4
23-Oct Barry 453 NULL Room 8 NULL
24-Oct Barry 453 Room 2 NULL NULL
23-Oct Mary 139 Room 3 NULL Room 4
23-Oct Mary 139 NULL Room 6 NULL
24-Oct Mary 139 NULL NULL Room 9
24-Oct Mary 139 Room 1 NULL NULL
我怎样才能最好地查询它以获得下面的输出,即按日期、人员和期间分组?
Date Name Number Period1 Period2 Period3
-------------------------------------------------------
23-Oct Barry 453 NULL Room 8 Room 4
23-Oct Mary 139 Room 3 Room 6 NULL
24-Oct Barry 453 Room 2 NULL NULL
24-Oct Mary 139 Room 1 NULL Room 9