Compare feed pairs for exact multiset equality
Original fictional practice · CC BY 4.0 · 2026-11-11

TASK
For every feed pair a<b return feed_a,feed_b,difference_copies as the sum of absolute per-key count differences across their key union. Include zero for exact multiset matches. Sort pair.

OUTPUT
feed_a, feed_b, difference_copies

RULES
For every feed pair a<b return feed_a,feed_b,difference_copies as the sum of absolute per-key count differences across their key union. Include zero for exact multiset matches. Sort pair.
Return exactly the declared columns and order. Money uses integer cents; time and date units follow the task and field dictionary. NULL is unknown and differs from numeric zero.
These are original fictional records and exercise policies. Scenario data may be shared with related tasks, whose decisions and output contracts differ.

FIELD DICTIONARY
features:
  entity TEXT — Literal business key or category label. Match exactly and retain NULL where present.
  feature TEXT — Literal business key or category label. Match exactly and retain NULL where present.

feeds:
  feed TEXT — Literal business key or category label. Match exactly and retain NULL where present.
  key TEXT — Literal business key or category label. Match exactly and retain NULL where present.

evidence:
  claim TEXT — Literal business key or category label. Match exactly and retain NULL where present.
  source TEXT — Literal business key or category label. Match exactly and retain NULL where present.
  owner TEXT — Literal business key or category label. Match exactly and retain NULL where present.

METHOD
For every feed pair a<b return feed_a,feed_b,difference_copies as the sum of absolute per-key count differences across their key union. Include zero for exact multiset matches. Sort pair.
For the first output record, feed_a = one; feed_b = three; difference_copies = 3.
Inspect the source grain, keys and ties. Compare each result column with the full worked SQL and expected CSV.

COMMON WRONG TURN
Equal total row counts or equal distinct keys do not establish equality of duplicate multiplicities.

RESULT CHECK
For the first output record, feed_a = one; feed_b = three; difference_copies = 3.

Use setup.sql in a fresh SQLite database and run your own SELECT or WITH. reference.sql and expected.csv contain the full worked answer. All CSVs have UTF-8 headers; empty output fields represent NULL. The browser executes SQLite, not Excel formulas. No spreadsheet function engine is claimed.
