How do COUNT and SUM differ?
- COUNT sorts rows, SUM deletes them
- COUNT tallies rows, SUM adds values
- COUNT renames tables, SUM renames columns
What links rows across two tables in a join?
- The matching key value
- The table colours
- The number of columns
An inner join keeps members who have no loans.
Circle one: True False
A result row shows Sam with a count of 3. What does that row represent?
- Three separate members called Sam
- One loan worth three points
- One member and their loan count
Members is joined to Loans with an inner join. Which rows does the join drop?
- Members with no loans and loans with no member
- The members who borrowed most
- Nobody, because joins keep everything
A join with no matching condition pairs every row with every row.
Circle one: True False
A join of two 500-row tables returns 250,000 rows. What went wrong?
- The tables are too small to join
- COUNT is broken and must be replaced
- The join condition is missing, so every pair survived
The librarian wants every member listed, including members with zero loans. What should the query use?
- An inner join plus a bigger LIMIT
- An outer join that keeps unmatched members
- No join at all, just the Loans table