我正在使用这个查询:
SELECT c.Name
, o.custid
, o.orderno
, o.orderdate
FROM orders o
INNER JOIN customers c ON o.custid = c.custid
ORDER BY Name, orderno, departmentid ASC, orderdate ASC
我想获得相同custid
的orderdate asc
. 条件
order by name, orderno ,departmentid asc
是强制性的。
例子: .....
James 1 10101 110332 28081312 - time
James 1 10101 110332 29081312
....