knz Merge pull request #12167 from knz/fix-order-by-count
sql: fix the ordering by COUNT(*).
Latest commit a855534 Dec 8, 2016