MySQL JSON_OVERLAPS function compares two doc_path or arrays.It returns 0 if value do not match and 1 if it does.
JSON_OVERLAPS(doc_path1, doc_path2)
For your query, I have created a second array with one value [1] i.e. for Sunday. This will compare all records and return 0 and 1.Query result for sellers working on Sundays will return 1. To eliminate non-required records which are returning 1, I have added a WHERE clause. Here is the query:
SELECT * FROM table_name
WHERE JSON_OVERLAPS(Seller_Non_Working_Day , '[1]') != 1 ;
There is another function JSON_CONTAINS which will list all records containing the specific value e.g. [1] at any position within JSON array. The syntax for JSON_CONTAINS is
JSON_CONTAINS(target, candidate[, path])
target is a specific field. Here it would be Seller_Non_Working_Day
candidate is a specific value to find. Here it would be [1]
Path is any specific array location which is optional.
One can use below query to fetch all sellers which are working on Sundays.
SELECT * FROM table_name
WHERE JSON_CONTAINS(Seller_Non_Working_Day , '[1]');