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

回答編集履歴

1

訂正

2021/04/09 08:09

投稿

sazi
sazi

スコア25430

answer CHANGED
@@ -4,10 +4,12 @@
4
4
  where not exists(
5
5
  select 1 from products p where p.id > products.id and p.name=products.name
6
6
  )
7
+ and (
7
- and (name = 検索値段1 and date >= 検索日付1)
8
+ (name = 検索値段1 and date >= 検索日付1)
8
9
  OR (name = 検索値段2 and date >= 検索日付2)
9
10
  OR (name = 検索値段3 and date >= 検索日付3)
10
11
 
11
12
 
12
13
 
14
+ )
13
15
  ```