title: SQL Error Code : 1242 / How to convert my code in a table?
body: <p>I everybody, despite the reading of many documents and webpages I don't get how to make my code work.</p>
  
  <pre><code>select
  (select count(*) from toto where (ddate between '2012-01-01' and '2012-12-31') group by produit) "2012",
  (select count(*) from toto where (ddate between '2011-01-01' and '2011-12-31') group by produit) '2011',
  (select count(*) from toto where (ddate between '2010-01-01' and '2010-12-31') group by produit) '2010'
  </code></pre>
  
  <p>I have a SQL Error Code : 1242 message. And yes it is normal because I do have more than 1 row to return.</p>
  
  <p>How could I handle it ? With the use of PIVOT ? But how ?</p>