Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试获取 SQL Server 中的上四分位数、中位数和下四分位数。有什么函数或公式吗?请指教 - 非常感谢
您可以将NTILE函数与Over子句一起使用,按表中的任何适当列对数据进行排序/
听起来您需要具有 4 的 ntile 函数(将基于列的所有值排列为 4 个桶)或 3 将基于列的所有值排列为三个桶。