› MySQL 5.5 Community Server
› MySQL 5.6 Community Server
› Percona Configuration Wizard
› XtraBackup 搭建主从复制
Great Sites on MySQL
› Percona
› MySQL Performance Blog
› Severalnines
推荐管理工具
› Sequel Pro
› phpMyAdmin
推荐书目
› MySQL Cookbook
MySQL 相关项目
› MariaDB
› Drizzle
参考文档
› http://mysql-python.sourceforge.net/MySQLdb.html
cloudbeyond
V2EX  ›  MySQL

请教一下如果用 MySQL 进行组内的中位数

  •  
  •   cloudbeyond ·
    elbertwang · Mar 3, 2016 · 4303 views
    This topic created in 3869 days ago, the information mentioned may be changed or developed.
    下面这个输出是一个 select 查询出来的结果,现在想在外面嵌套一层查询,求出各组内的中位数。
    比如 period 这个组中的 dt 的中位数
    想了很久,也查了文档,看到 Mysql 文档页面下面讨论,最后是用临时表解决的。
    但是还是想知道一下能不能直接查询出来,多谢大家指教。

    1 replies  •  2017-02-08 18:26:13 +08:00
    yidinghe
        1
    yidinghe  
    PRO
       Feb 8, 2017
    “如果” 和 “如何” 是两个不同的词。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   833 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:24 · PVG 03:24 · LAX 12:24 · JFK 15:24
    ♥ Do have faith in what you're doing.