title: Getting data from two tables with condition SQL
body: <p>I need help with SQL query. I've been trying to figure it out for a week.</p>
  <p>I need it to get data from both tables, but if the date and sport are the same as in the second table, the data will only be taken from the first table.</p>
  <p>Each table can have 4 sports with the ID from the connected table.</p>
  <p>So the date can be the same 4 times, but each time with a different sport.
  That means if in the first table the date is 2020-01-01 and sport is ID 1 and in the second table the date is 2020-01-01 and sport ID 2 the data will be taken from both tables.
  But if in the first table the date is 2020-01-01 and sport ID 1 and in the second table the date is 2020-01-01 and sport ID 1, the data is taken only from the first table.</p>
  <p>Is it possible to do it somehow? I will be happy for any idea. Thank you!</p>
  <p>I use MariaDB. First table is named reservation and second one reservation_r.</p>
  <p><a href="https://i.stack.imgur.com/BymlZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BymlZ.png" alt="table1" /></a>
  <a href="https://i.stack.imgur.com/bOWC4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bOWC4.png" alt="table2" /></a></p>
  <p><strong>Example with result:</strong></p>
  <p><a href="https://i.stack.imgur.com/ivmvP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ivmvP.png" alt="enter image description here" /></a></p>