So say I have this table called Key_Values that looks like
--keys--|--values--
A | 1
A | 1
A | 2
B | 1
B | 1
C | 3
C | 3
C | 4
I need to write a single select statement that would get all of the distinct keys, and their respective values' mode. It would return this
--keys--|--values--
A | 1
B | 1
C | 3
I'm having some trouble figuring out the correct way to do this. I know I can do a DISTINCT(keys), but I'm not sure how to get the values from that.