From 89cce103630d47bec9e8c0bb79c47ce6b2dee66f Mon Sep 17 00:00:00 2001 From: aoge2716 Date: Tue, 18 Mar 2025 03:21:23 +0100 Subject: [PATCH] finished interations --- queries.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; + ```