1
我試圖從最高的qtyOrdered到最低的順序來獲得這個查詢,但是當我運行它時,它的確是相反的。結果是qtyOrdered從最低到最高運行。任何幫助?MySQL:按不正確的順序排列
在此先感謝!
這裏是我的SQL:
select Product.productId, Product.prodName, OrderedProduct.qtyOrdered, CustOrder.orderDate
from Product
join OrderedProduct
on Product.productId=OrderedProduct.productId
join CustOrder
on CustOrder.orderId=OrderedProduct.orderId
where qtyOrdered >= '50'
and orderDate between '2015-01-01' and '2015-01-31'
order by qtyOrdered;
您需要添加DESC,通過desc降序排列,升序爲ASC –