Rearranged SQL statements.