title: GROUP BY and Aggregation on Vector of maps - Clojure
body: <p>I have data that looks like this </p>
  
  <pre><code>(def a [{:firmAccount "MSFT" :Val 10  :PE 3 }  
          {:firmAccount "MSFT" :Val 15  :PE 4} 
          {:firmAccount "GOG" :Val 15 :PE 3} 
          {:firmAccount "YAH" :Val 8 :PE 1}])
  </code></pre>
  
  <p>I want to group by on :firmAccount and then SUM the :Val and :PE for each firm account and get something like </p>
  
  <pre><code> [{:firmAccount "MSFT" :Val 25 :PE 7}
    {:firmAccount "GOG" :Val 15 :PE 3}    
    {:FirmAccount "YAH" :Val 8 :PE 1}]
  </code></pre>
  
  <p>It is really a trivial thing and in SQL I would not even think twice but since I am learning clojure please bear with me</p>