Created
April 17, 2022 14:14
-
-
Save yssymmt/952537ffe283e0784c0a63d7b52dc69c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select 顧客番号, 年月, | |
(cast((売上数量) as float) - avg(売上数量) over(partition by 顧客番号)) / stddev_pop(売上数量) over(partition by 顧客番号)) as 売上数量z, | |
(cast((平均単価) as float) - avg(平均単価) over(partition by 顧客番号)) / stddev_pop(平均単価) over(partition by 顧客番号)) as 平均単価z | |
from データベース名.テーブル名 | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment