From surenkid, 3 Months ago, written in MySQL.
Embed
  1. SET @mydate = '20190601';
  2. SELECT CONCAT(u.lastname,u.firstname) `name`
  3. ,s.`name` status_name
  4. ,i.`subject`
  5. ,i.start_date
  6. ,i.due_date
  7. ,i.closed_on
  8. ,i.done_ratio
  9. ,CONCAT('http://my.sumeils.com:3001/issues/',i.id) URL
  10. FROM issues i
  11. LEFT JOIN users u ON i.assigned_to_id = u.`id`
  12. LEFT JOIN issue_statuses s ON s.id = i.status_id
  13. WHERE i.start_date>=@mydate OR i.due_date>=@mydate
  14. -- CURRENT_DATE BETWEEN i.start_date AND i.due_date
  15. ORDER BY i.id;