关系用户 has_many :kits
用户模型和命名范围:
scope :top5_users,
joins(:kits).
select("users.*, count(kits.id) AS kits_count").
group("users.id, kits.id").
order("kits_count DESC").
limit(5)
获取 PG::Error: ERROR: ORDER BY "kits_count" 不明确