title: SQL: list rows that do not have any transactions
body: <p>I have a table for definition - def</p>
  
  <pre><code>Id        Device            Location
  1         GGHY199           USA
  12        DFGHY71           India
  145       APPHY75           USA
  </code></pre>
  
  <p>And its transactions are recorded in a diff table -event</p>
  
  <pre><code>eventid        deviceid         event                date
  123              12             Login              12-01-2019
  32               12             Unreachable        18-02-2019
  223              145            Unreachable        19-02-2019
  334              1              DOWN               01-03-2019
  </code></pre>
  
  <p>I want an output as 
  for every day, all three devices should show, if it has no transacion, it should show as null, with what i assume is the first date of the month in the date column.
  like,</p>
  
  <pre><code>eventid        deviceid         event                date
  null             1              null               01-01-2019
  123              12             Login              12-01-2019
  null             145            null               01-01-2019
  null             1              null               01-02-2019
  32               12             Unreachable        18-02-2019
  223              145            Unreachable        19-02-2019
  334              1              DOWN               01-03-2019
  null             12             null               01-03-2019
  null             145            null               01-03-2019
  </code></pre>
  
  <p>currently im doing:</p>
  
  <pre><code>select * from def
  left join 
  event on def.id=event.deviceid
  </code></pre>
  
  <p>and im obviously not getting what i want.</p>
  
  <p>Thanks!</p>