title: Retrieve data from both tables one to many relationship in mysql
body: <p>I've two table <code>Rule</code> and <code>Action</code>.</p>
  
  <p>One rule can have many actions </p>
  
  <p>lets say Action  have a1,a2,a3 3 rows related to One Rule</p>
  
  <p>then i want to select </p>
  
  <pre><code>r1.*, a1.name, a1.createdon, a1.modifiedon, 
        a2.name, a2.createdon, a2.modifiedon, 
        a3.name, a3.createdon, a3.modifiedon 
  </code></pre>
  
  <p>but r2 may do not have any rule. 
  so it will select data from <code>Rule</code> only</p>
  
  <p>result </p>
  
  <pre><code>r*
  </code></pre>
  
  <p>I've written this query </p>
  
  <pre><code>SELECT * 
  FROM Rule RB 
  LEFT JOIN (
      SELECT RelatedRuleId
      FROM Action_ GROUP BY RelatedRuleId
  ) R ON R.RelatedRuleId =  RB.RuleId
  </code></pre>
  
  <p>this is not giving me correct result.</p>
  
  <p><strong>how can i pull this? I want one rule row with multiple actions in same row.</strong></p>