Sort transactions