title: Why is GROUP BY faster than DISTINCT in SQL?
body: <p>This article explains that GROUP BY is faster than DISTINCT
  <a href="https://sqlperformance.com/2017/01/t-sql-queries/surprises-assumptions-group-by-distinct" rel="nofollow noreferrer">https://sqlperformance.com/2017/01/t-sql-queries/surprises-assumptions-group-by-distinct</a></p>
  <p>Why doesn't the implementation of DISTINCT just use the same underlying logic if it's faster?</p>