當前位置:首頁 » 股票區塊 » 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

運行結果: