I need to perform the following query:
SELECT ID FROM tbl_a WHERE (fld_merchID, 'something') IN
(SELECT MerchID, MAX(Priority) FROM tbl_b WHERE Name LIKE 'AAA.com')
as you can image, there's no 'Priority' field in tbl_a. (I need to select the MerchID with the higher Priority value).
That query is returning empty and it shouldn't.
I'm not sure how to do it.
Thanks!