By MYSQL, Filtering Products in table where Attribute_Value = "Jane Paul" AND Attribute_Value = "Diamond Publication". This type of query should show result at Book_1 as it is only product where Attribute_Value is matching. What MYSQL Query we can use for this?
Asked
Active
Viewed 48 times
0
-
What happens with the query? How is `PHP`, `MySQLi`, and `mysql-workbench` related? – user3783243 Jan 25 '22 at 14:11
-
Does this answer your question? [INTERSECT in MySQL](https://stackoverflow.com/questions/2300322/intersect-in-mysql) – user3783243 Jan 25 '22 at 14:13
1 Answers
1
Try something like this
SELECT DISTINCT Product
FROM yourTable
WHERE Product IN (SELECT Product FROM yourTable WHERE Attribute_value = 'Jane Paul')
AND Product IN (SELECT Product FROM yourTable WHERE Attribute_value = 'Diamond Publication')

Kathi Kellenberger
- 104
- 4