Skip to content

Instantly share code, notes, and snippets.

View rodriguezd's full-sized avatar

David Rodriguez rodriguezd

View GitHub Profile
3) Which DVD is the most expensive?
SELECT title FROM dvd WHERE price = (SELECT MAX(price) FROM dvd);
4) What is the total cost of any two DVD's (your choice which two)
SELECT SUM(price) FROM dvd WHERE id IN (1, 2);
5) Return just the titles for all the DVD's in the database.
SELECT COUNT(*)
FROM answer, choice, question
WHERE(
answer.user_id = 1 AND
question.quiz_id = 1 AND
question.question_id = answer.question_id AND
choice.question_id = answer.question_id AND
choice.choice_id = answer.choice_id AND
choice.choice_correctness = 1
);
country_capitals
(6, 'Capital of the United States?", 2)
(7, 'Capital of Japan?", 2)
(8, 'Capital of Russia?", 2)
(9, 'Capital of England?", 2)
(10, 'Capital of Germany?", 2)
David Rodriguez
Github Username: rodriguezd
Blog Url: rodriguezd.github.io
Tagline: "Great coders do not choose their destiny, destiny chooses them."
Profile Picture (something normal, a headshot, of a good reusable size that can be easily cropped)
1. Grab the jar that says "JELLY" on it.
2. Twist off the top of the jelly jar and place the top on the table.
3. Place the jelly jar back on the table.
4. Grab the jar that says "PB" on it.
5. Twist off the top of the PB jar and place the top on the table.
6. Place the PB jar back on the table.
7. Grab the bag that says "BREAD".
8. Open the bread bag.
9. There are many slices in the bag, pull one slice out of the bag.
10. Place the bread bag back on the table.