title: mysql get attendance of all students for each date in a range
body: <p>I have the following tables<br>
  Students Table</p>
  
  <pre><code>id  name
  1    A1
  2    A2
  3    A3
  </code></pre>
  
  <p>And Atendance table</p>
  
  <pre><code>student_id   status  date
  1              P      2020-02-14
  2              P      2020-02-14
  1              A      202-02-15
  </code></pre>
  
  <p>What I want is that the attendance should be shown for all dates, irrespective of data is present in the data tables or not. I have tried the following query</p>
  
  <pre><code>SELECT student.name, attendance.status 
  from student
    LEFT JOIN attendance ON student.id = attendance.student_id
                        AND attendance.date = '2020-02-14'
  </code></pre>
  
  <p>With the above query I get the output as</p>
  
  <pre><code>id  name   status     date
  1    A1      P      2020-02-14
  2    A2      P      2020-02-14
  3    A3      null   null
  </code></pre>
  
  <p>But I want the output to be</p>
  
  <pre><code>id  name   status     date
  1    A1      P      2020-02-14
  2    A2      P      2020-02-14
  3    A3      null   2020-02-14
  1    A1      A      2020-02-15
  2    A2      null   2020-02-15
  3    A3      null   2020-02-15
  </code></pre>
  
  <p>Is is possible to achieve the above output using a single query? Or do I need to do some operations by converting the query output into JSON to get the desired output?</p>