Updated ordering in SQL script.