yuhsing

Untitled

Jul 31st, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. SELECT *,SUM(Quantity) AS `total` FROM `sample` WHERE `Quantity` >= 1 GROUP BY `ProductID` ORDER BY `total` DESC LIMIT 5
Advertisement
Add Comment
Please, Sign In to add comment