[tbl_votes]
- id <!-- unique id of the vote) -->
- item_id <!-- vote belongs to item <id> -->
- vote <!-- number 1-10 -->
当然,我们可以通过获取来解决这个问题:
- (
smallest observation
所以) - (
lower quartile
lq) - (
median
我) - (
upper quartile
uq) - 和
largest observation
(lo)
..一个接一个地使用多个查询,但我想知道是否可以通过单个查询来完成。
在 Oracle 中,我可以使用COUNT OVER
and RATIO_TO_REPORT
,但这在 mySQL 中不受支持。
对于那些不知道箱线图是什么的人:http ://en.wikipedia.org/wiki/Box_plot
任何帮助,将不胜感激。