diff --git a/queries.md b/queries.md index b06f900..5ebce02 100644 --- a/queries.md +++ b/queries.md @@ -8,6 +8,9 @@ ```sql -- Your Query Goes Here +select books.id, books.title, author.name as author_name +from books +inner join author on book.author_id = author.id ```
@@ -16,6 +19,9 @@ ```sql -- Your Query Goes Here +select authors.id, authors.name as author_name, book.title as book_title +from authors +left join books on authors.id = books.author_id; ```
@@ -24,6 +30,10 @@ ```sql -- Your Query Goes Here +SELECT books.id, books.title AS book_title, authors.name AS author_name +FROM authors +RIGHT JOIN books ON authors.id = books.author_id; + ```
@@ -32,6 +42,10 @@ ```sql -- Your Query Goes Here +SELECT books.id AS book_id, books.title AS book_title, authors.id AS author_id, authors.name AS author_name +FROM authors +FULL JOIN books ON authors.id = books.author_id; + ```