Вы можете использовать оконные функции, если ваша база данных поддерживает это:
select key, value as mode
from (select key, value, count(*) as cnt,
row_number() over (partition by key order by count(*) desc) as seqnum
from keyvalue
group by key, value
) kv
where seqnum = 1;
В MS Access это гораздо более болезненно:
select key, value, count(*) as cnt
from keyvalue kv
group by key, value
having kv.value = (select top (1) kv2.value
from keyvalue kv2
where kv2.key = kv.key
group by kv2.value
order by count(*) desc
);