title: Getting error Subquery returns more than 1 row
body: <p>I am trying to write following query in mysql:-</p>
  
  <pre><code>SELECT *
  FROM eon.merged_monthly_energy_data
  where consumption&gt;0 
    and ((SELECT TIMESTAMPDIFF(YEAR, mmed.start_date, CURDATE()) AS difference 
          FROM merged_monthly_energy_data mmed) &lt;1) ;
  </code></pre>
  
  <p>However, I am getting following error:-</p>
  
  <blockquote>
    <p>Error Code: 1242. Subquery returns more than 1 row</p>
  </blockquote>
  
  <p>I am not sure why subquery returning more than one result is creating problem here:-</p>