title: SQL - Distinct subquery
body: <p>Someone can explain how to do this query:</p>
  
  <p>i must select all the fields with no duplicate "idPrdodotto"</p>
  
  <p><img src="https://i.stack.imgur.com/jWAiv.jpg" alt="That&#39;s the table"></p>
  
  <p>That's my not working query:</p>
  
  <pre><code>SELECT *
  FROM riempie1
  WHERE idProdotto IN (SELECT DISTINCT idProdotto
                       FROM riempie1
                      );
  </code></pre>