Maximum in group by active record query
问题 I have a Model which has two attributes (I am showing only two as only those two columns are needed) MyModel place_id ------------------------ user_id 1 ---------------------------------- 1 1 ---------------------------------- 2 1 ---------------------------------- 2 3 ---------------------------------- 3 3 ---------------------------------- 2 3 ---------------------------------- 3 3 ---------------------------------- 1 I want to fetch group by maximum records. Basically I want to fetch for a