たとえば、4 つの請求レコードがあります。
id = 1
prize = 100
city = "newyork"
id = 2
prize = 200
city = "NEWYORK"
id = 3
prize = 300
city = "Boston"
id = 4
prize = 400
city = "BOSTON"
のようなハッシュを持つ都市の統計を取得したい{"Newyork" => 2 , "Boston" => 2 }
たとえば、4 つの請求レコードがあります。
id = 1
prize = 100
city = "newyork"
id = 2
prize = 200
city = "NEWYORK"
id = 3
prize = 300
city = "Boston"
id = 4
prize = 400
city = "BOSTON"
のようなハッシュを持つ都市の統計を取得したい{"Newyork" => 2 , "Boston" => 2 }