teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

推敲

2021/10/01 03:47

投稿

sazi
sazi

スコア25430

answer CHANGED
@@ -3,7 +3,7 @@
3
3
  ```SQL
4
4
  select * from ZZZ
5
5
  where (ID, 計測日) in (
6
- select ID, coalesce(max(case when BMI is not Nul then 計測日 end), max(計測日))
6
+ select ID, coalesce(max(case when BMI is not Null then 計測日 end), max(計測日))
7
7
  from ZZZ
8
8
  where 計測日 <= 21/09/15
9
9
  group by ID