Loading topic
SELECT statements. A join combines related tuples from two relations. In relational algebra, a join is usually built from a Cartesian product followed by a condition.2 min readSELECT statements. This chapter connects relational algebra, tuple relational calculus, and SQL. It also explains why duplicate rows and NULL values can change an SQL answer.2 min readSELECT-FROM-WHERE queries. A join combines rows from two or more tables using a matching condition. The result contains columns from the joined tables.1 min readSELECT-FROM-WHERE queries, elementary set operations, and that two tables can have different row counts. SQL set operations combine the results of two complete queries.2 min readSELECT-FROM-WHERE, and the logic of “there exists” and “for all.” A subquery is a query written inside another SQL query. It lets one query use the result of another query.2 min readSELECT ... FROM ... WHERE queries. This chapter adds aggregate functions, which compute one value from several rows.1 min readSELECT, comparison operators, and Boolean logic. This chapter focuses on how SQL handles missing or unknown values.1 min readSELECT, joins, primary keys, and first-order logic. In particular, ∀ means “for every,” and ∃ means “there exists.” SQL has no direct FOR ALL operator, so express a universal condition by checking that no counterexample exists.1 min read