In the query above, the ORDER BY clause sorts the result set by last name in descending order first, and then sorts the sorted result set by first name in ascending order to produce the final result set.
ในแบบสอบถามดังกล่าวข้างต้น ORDER BY ประโยคเรียงลำดับผลการตั้งค่าโดยใช้ชื่อสุดท้ายในลำดับถัดลงมาเป็นครั้งแรกและจากนั้นเรียงลำดับผลเรียงตั้งตามชื่อในลำดับที่จะผลิตชุดผลสุดท้าย