select device_id,age from user_profile order by age

  • ORDER BY 列名 ASC 或 DESC

表示按<列名>进行升序(ASC)或降序(DESC)排序