title: MySQL update job with LEFT JOIN and GROUP BY
body: <p>Is there a way to update a value based on the result of left joins and group by?</p>
  
  <p>I want to be able to update category with current jobs to visible and I tried below but it doesn't work</p>
  
  <pre><code>UPDATE category c 
              LEFT JOIN portfolio_job_category pjc
              ON pjc.category_id = c.id
              LEFT JOIN job j
              ON j.id = pjc.job_id
              SET c.visible = 0
              WHERE (c.visible = 0 
              OR c.visible IS NULL)
              AND j.end_date &gt; CURRENT_DATE
              GROUP BY cat_id
  </code></pre>