order by

    • 集合 foo.bar 中原始记录。
    • 希望按部门计算员工数,并按部门号降序输出。
    1. > db.exec( "select dept_no,count(emp_no) as 员工总数 from foo.bar group by dept_no order by dept_no desc" )
    2. { "dept_no": 1, "员工总数": 2 }
    3. Return 2 row(s).
    4. Takes 0.6694s.