Created
July 30, 2019 16:18
-
-
Save krokrob/186b1b8101b30a635c4c3731dd6909e5 to your computer and use it in GitHub Desktop.
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
-- QUIZZ DB & ActiveRecord | |
-- Q1 A bunch of tables contining data connected between each other through a system of primary(id)/foreign keys(xxxxx_id) | |
-- Q2 1:N | |
-- N:N | |
-- 1:1 | |
-- Q5 SQL | |
-- Q6 | |
SELECT * | |
FROM books | |
WHERE publishing_year < 1985 | |
-- Q7 | |
SELECT b.id, b.title, b.publishing_year | |
FROM books b | |
JOIN authors a ON a.id = b.author_id | |
WHERE a.name = 'Jules Verne' | |
ORDER BY b.publishing_year DESC | |
LIMIT 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment