title: How to use GROUP BY on two columns even if their values are swapped
body: <p>I recently ran into a problem where I have to group by 2 columns with similar values. The columns can swap values anytime but I still need to group them.</p>
  <p>For example, consider there is a duo that completes certain tasks</p>
  <pre class="lang-none prettyprint-override"><code>COL 1   |  COL 2   |  COL 3
  User 1  |  User 2  |  Task 1
  User 1  |  User 2  |  Task 2
  User 1  |  User 2  |  Task 3
  User 2  |  User 1  |  Task 4
  </code></pre>
  <p>in the above example, User 1 and User 2 have worked together 4 times and have completed 4 tasks. I am using GROUP BY on COL1 and COL2 but it is grouping the first 3 results and is leaving out the fourth one because the columns have swapped values. How can I deal with this?</p>