I have three tables :
field:
| f_id | f_start | f_end |
|---|---|---|
| 1 | 10 | 20 |
| 2 | 15 | 25 |
| 3 | 5 | 10 |
person :
| p_id | p_name |
|---|---|
| 1 | Roger |
| 2 | John |
| 3 | Alicia |
affect :
| id | fk_field | fk_person |
|---|---|---|
| 1 | 2 | 1 |
| 2 | 1 | 2 |
| 3 | 3 | 3 |
And I would like to select the dates and the names associated to. Like this
| p_name | f_start | f_end |
|---|---|---|
| Roger | 15 | 25 |
| John | 10 | 20 |
| Alicia | 5 | 10 |
I'm new to SQL and I don't know if i have to use JOIN or not... Thanks