title: Combine rows into a list in PrestoSQL
body: <p>Currently, my table has three different fields, <code>id1</code>, <code>id2</code> and <code>actions</code>. <code>action</code> is of type string. For example, my table looks something like the table given below:</p>
  
  <pre><code>id1   |   id2  |   actions
  ---------------------------
  "a1"      "a2"     "action1"
  "b1"      "b2"     "action2"
  "a1"      "a2"     "action3"
  </code></pre>
  
  <p>If the values of <code>id1</code> and also the values<code>id2</code> are same for any number of rows, I want to combine those rows so that the <code>actions</code> field becomes a list of string. If none of the rows have same values for <code>id1</code> and same values for <code>id2</code>, I want to still convert the <code>actions</code> fields as a list but only with one string. For example, the output of the query should look something like the following:</p>
  
  <pre><code>id1   |   id2  |   actions
  ---------------------------
  "a1"      "a2"     ["action1", "action3"]
  "b1"      "b2"     ["action2"]
  </code></pre>
  
  <p>I know some basics of Presto and can join columns based on conditions but was not sure if this can be achieved with query. If this can be achieved, what is a good approach to move forward with the implementation of this logic? </p>