Separate feature row frequency from entity adoption
Original fictional practice · CC BY 4.0 · 2026-11-11

TASK
For every feature return feature,raw_rows,adopting_entities,duplicate_rows=raw-distinct entities. Sort feature.

OUTPUT
feature, raw_rows, adopting_entities, duplicate_rows

RULES
For every feature return feature,raw_rows,adopting_entities,duplicate_rows=raw-distinct entities. Sort feature.
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 feature return feature,raw_rows,adopting_entities,duplicate_rows=raw-distinct entities. Sort feature.
For the first output record, feature = x; raw_rows = 4; adopting_entities = 4; duplicate_rows = 0.
Inspect the source grain, keys and ties. Compare each result column with the full worked SQL and expected CSV.

COMMON WRONG TURN
Repeated source rows increase occurrence counts without increasing adoption.

RESULT CHECK
For the first output record, feature = x; raw_rows = 4; adopting_entities = 4; duplicate_rows = 0.

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.
