• mysql top 10


    --Top 10 网点

                       SELECT

             t.site_id

    FROM

             (

                       SELECT

                                site_id,

                                count(1),

                                @curRank :=@curRank + 1 rank

                       FROM

                                express_order_stor t,

                                (SELECT @curRank := 0) f

                       WHERE

                                t.postman_id = 1877665

                       AND t.create_time >= '2019-02-01'

                       AND t.create_time < '2019-03-01'

                       AND t.`status` = 7

                       GROUP BY

                                t.site_id

                       ORDER BY

                                count(1) DESC

             ) t

    WHERE

             t.rank <= 10;

  • 相关阅读:
    Robot Framework的日期处理
    让IIS7和IIS6识别PUT和DELETE请求
    《微服务设计》读书笔记大纲
    规模化微服务——《微服务设计》读书笔记
    Uva 11396 爪分解
    Uva 10765 鸽子和炸弹
    Gym
    Gym
    Gym 101334C 无向仙人掌
    汇编实验十:编写子程序
  • 原文地址:https://www.cnblogs.com/zfzf1/p/10624117.html
Copyright © 2020-2023  润新知