title: Fetching Data from joining table for any one from condition satisfied
body: <p>I have two table called Activity And Claim. Activity Table contains Activity id and all other Activity Details. Claim Table contains all claim related information for the Activity. One activity have multiple claims and activity id is the foreign key for claim table.</p>
  
  <p>In claim table i am maintaining different status(Approved, Deleted, rejected, Submitted) for each claim.</p>
  
  <p>Currently i am facing one issue for fetching data from activity table if any one of the claim present in claim table and any one of the claim status not in Approved, rejected, submitted.</p>
  
  <p>For an example if an Activity have two different claim and one claim is approved status and another claim in deleted status. So in my sql query should returns empty(because one claim already approved for activity). In another example if the activity have only one claim and status is deleted. This cause my query should fetch the Activity Details(because the activity have only one claim and it's on deleted status).</p>
  
  <p>The query which i am currently using is below</p>
  
  <pre><code>SELECT * 
  FROM myactivities_4 
  LEFT JOIN claims2 ON claims2.activityid = myactivities_4.activityid 
  AND claim_status NOT IN ('Submitted', 'Approved','Rejected')
  </code></pre>
  
  <p>Could any one help me to resolve this issue</p>