Added tests for grouping, aggregation, sorting, and joining