title: MySQL :- Adding where clause to this query
body: <p>I have 2 queries but I confused where to add where clause.</p>
  
  <pre><code>select supplier_id,count(*) c, party_name, SUM(po_value) po_value
  from purchase_order join supplier s on s.id=supplier_id
  group by supplier_id
  having c&gt;1 ORDER BY c DESC LIMIT 5
  </code></pre>
  
  <p>Second query</p>
  
  <pre><code>select warehouse_id, warehouse_name, SUM(available_quantity) available_quantity
  from stock join warehouse s on s.id=warehouse_id 
  group by warehouse_id 
  </code></pre>
  
  <p>In both the queries finally I have to fetch based upon a id like <code>where org_id='152'</code></p>