Last active
March 16, 2022 16:34
-
-
Save yssymmt/e715127fc2066aeaded2b62258550982 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 | |
顧客番号, | |
契約番号, | |
row_number() over(partition by 顧客番号,契約番号 order by 更新日付 desc) as rndesc | |
from データベース名.テーブル名 | |
qualify rndesc=1 | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment