SQL Taskbook Level 5.3
The tables are given:
| id | first_name | last_name | date_of_birth |
|---|---|---|---|
| 1 | John | Smith | 1987-12-12 |
| 2 | Alex | Cooper | 1999-02-20 |
| 3 | Agata | Leyla | 1970-01-30 |
| 4 | Ivan | Ivanov | 1994-05-31 |
| 5 | Peter | Petrov | 1991-08-24 |
| id | title | body | author_id |
|---|---|---|---|
| 1 | Post-1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. | 12 |
| 2 | Post-2 | Duis aute irure dolor in reprehenderit in voluptate. | 24 |
| 3 | Post-3 | Sed ut perspiciatis, unde omnis iste natus error. | 2 |
| 4 | Post-4 | Ut enim ad minima veniam, quis nostrum. | 1 |
| 5 | Post-5 | Quis autem vel eum iure reprehenderit. | 34 |
| 6 | Post-6 | Et harum quidem rerum facilis est et expedita. | 31 |
| 7 | Post-7 | Excepteur sint occaecat cupidatat. | 22 |
| 8 | Post-8 | Ullam corporis suscipit laboriosam, nisi ut aliquid. | 11 |
Solve the following tasks for them:
Задание 1
Get the entire list of posts and their authors, even if the post has no author.
Задание 2
Get the entire list of authors and their posts, even if the author doesn't have any.
Задание 3
Get the names and year of birth of the authors and the name of the post they wrote. Note that the author may not have written any posts.
Задание 4
Get the names of authors and their posts. Moreover, for all authors who do not have a single post.