1/8
Original instructor Deck 06, cards 1–9. Quiz 3 scope. Instructor wording and answers preserved.
What SQL clause lets you combine two tables?
JOIN
What are two SQL clauses that let you filter down what rows are included based on some condition, and how do these two clauses differ?
WHERE and HAVING WHERE is prior GROUP BY (if GROUP BY is used), so filters input rows HAVING is after GROUP BY, so filters groups
What SQL clause pulls together related rows?
GROUP BY
In SQL, SUM, AVG, and other operations that work over all rows (or groups of rows) are called ______
aggregates
What SQL clause sorts rows?
ORDER BY
What SQL clause lets you limit results to the first N rows?
LIMIT
What does ACID stand for?
atomiticy: it all happens or nothing happens (partial progress is rolled back) consistency: application invariants (like no negative bank accounts) are supported isolation: others cannot see a transaction in progress (aka atomicity when talking about locks) durability: once finished, it persists (even if machine crashes+restarts)
If conn is a SQLAlchemy connection, and you've made some changes as part of a transaction, how do you finalize that transaction?
conn.commit()
If conn is a SQLAlchemy connection, and you've made some changes as part of a transaction, how do you abandon that transaction?
conn.rollback()