This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Challenge 1: Find the 10 longest books (by pages) in the database | |
SELECT | |
books.title, | |
author, | |
pages | |
FROM | |
books | |
WHERE | |
pages IS NOT NULL | |
ORDER BY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- SELECT | |
WITH recursive custom_cte AS | |
( SELECT | |
* | |
FROM | |
target_table | |
WHERE | |
target_table.id = "value" | |