【发布时间】:2018-02-05 22:19:13
【问题描述】:
如何在spark-sql 中获得每个组的前 n 名(比如说前 10 名或前 3 名)?
http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/ 提供通用 SQL 教程。但是,spark 并没有在 where 子句中实现子查询。
【问题讨论】:
标签: apache-spark group-by apache-spark-sql top-n