当前位置:首页 » 股票区块 » oracle分析函数新区板块股票
扩展阅读
设计总院股票历史股价 2023-08-31 22:08:17
股票开通otc有风险吗 2023-08-31 22:03:12
短线买股票一天最好时间 2023-08-31 22:02:59

oracle分析函数新区板块股票

发布时间: 2023-06-29 04:32:39

❶ oracle中统计出某一日按照买入用户数量最多的前五大股票

oracle中的统计分析函数可以按照用户id查询所有股票,然后按照数量由大到小排序。

举例如下:

SELECT

department_id,

first_name||' '||last_name employee_name,

hire_date,

salary,

STDDEV(salary) OVER (PARTITION BY department_id ORDER BY hire_date) AS "STDDEV",

STDDEV_SAMP(salary) OVER (PARTITION BY department_id ORDER BY hire_date) AS "STDDEV_SAMP",

VAR_POP(salary) OVER (PARTITION BY department_id ORDER BY hire_date) AS "VAR_POP",

VAR_SAMP(salary) OVER (PARTITION BY department_id ORDER BY hire_date) AS "VAR_SAMP",

VARIANCE(salary) OVER (PARTITION BY department_id ORDER BY hire_date) AS "VARIANCE"

FROM employees

运行结果: