Что является красноречивым эквивалентом этого запроса:
SELECT product_sku, request_id, product_id,
GROUP_CONCAT(case when ai_result = 'Match' then concat(r_image_url, '&id=', hash_id) END) as matched,
GROUP_CONCAT(CASE when ai_result = 'Non Match' then concat(r_image_url, '&id=', hash_id) END) as non_matched
FROM `product_match_unmatches`
WHERE (request_id, product_id) NOT IN ((66,0),(66,1),(66,19),(66,22),(66,35),(66,30))
GROUP BY request_id, product_id
У меня есть этот рабочий запрос до where not in
.
$products = DB::table('product_match_unmatches')
->select('product_sku', 'request_id', 'product_id')
->selectRaw('group_concat(case when ai_result = "Match" then concat(r_image_url,"&_id=",hash_id) END) as matched,
group_concat(case when ai_result = "Non Match" then concat(r_image_url,"&_id=",hash_id) END) as non_matched,
group_concat(s_image_url) as s_images');
Но я застрял на where not in
части.