title: MySQL - removal of duplicate results in JSON_ARRAYAGG in the presence of GROUP BY
body: <p>I have query:</p>
  
  <pre><code>SELECT id, JSON_ARRAYAGG(url) AS urlLinks
  FROM links
  WHERE id=832781
  GROUP BY id;
  </code></pre>
  
  <p>The result of this query duplicates the same image urls in column <code>urlLinks</code>:</p>
  
  <pre><code>["index.html", "index.html", "index.html", "index.html", "index.html"]
  </code></pre>
  
  <p>How can I leave as a result only unique image urls?</p>
  
  <pre><code>["index.html"]
  </code></pre>
  
  <p><code>GROUP BY</code> cannot be removed from the request!!!</p>