CHAIN and SORT statement tests.