title: MySQL Query Show Rows with columns data even if not exists
body: <p>I have a MySQL Table with the following columns</p>
  
  <pre><code>id
  action
  ip
  </code></pre>
  
  <p>The action column can contain several values such as ( edit , delete, add etc)</p>
  
  <p>I want to perform a MySQL Query and get some data based on the action value i will provive no matter if the action value exists or not.</p>
  
  <p>For example the following query</p>
  
  <pre><code>SELECT ip,COUNT(*) as total_actions FROM table 
  WHERE action IN ('edit','delete') group by ip;
  </code></pre>
  
  <p>This query returns data based on the action column and for example if there is no entry for <code>edit action</code> it will not be printed in the results.</p>
  
  <p>Instead, <strong>for the values i write in the IN statement i want to get their COUNT Values</strong> and <strong>for the values that don't exists the count should be 0.</strong></p>
  
  <p>How i can do that?</p>