I am using MYSQL 6.x with JSON functions and have the following query that I am trying to use WHERE or HAVING to limit the recordset - there is a column called properties which is JSON column and I need to perform a search with multiple conditions on this json data
SELECT JSON_EXTRACT(properties,'$.identifier') AS identifier,
JSON_EXTRACT(properties,'$.workflow_type') AS workflow_type
FROM workflow_pages HAVING workflow_type;
This returns the following data :-
+------------+---------------+
| identifier | workflow_type |
+------------+---------------+
| 9 | "dictionary" |
| 13 | "dictionary" |
| 11 | "dictionary" |
| 13 | "rule" |
| 134 | "rule" |
+------------+---------------+
How do I perform the same query above to only return the rows which have the following conditions
identifier IN 13, 134 AND workflow_type = 'rule'
How do I amend my query to do this as it seems MySQL doesn't allow for multiple HAVING conditions