check that sorting alphabetically or by date works correctly for the whole table