I have this kind of table:
a b
8 7
8 2
9 7
9 2
9 3
I want to get a "a" value such that it has the exact searched values for "b". For example, if I search for (7,2), I want the query to return 8, if I search for (7,2,3), I want it to return 9, otherwise it must return Null:
Search Result
(7,2) 8
(7,2,3) 9
(7,3) Null
(7,2,4) Null
...
Is it possible to do it without using the "group by" concatenation?
[Edit] For "group by concatenation" I mean something like the GROUP_CONCAT() in MySql or however any string functions.