Simplified key extraction for aggregate and join