{
  "title": "Spot a repeated revenue total after a one-to-many join",
  "synthetic": true,
  "inputs": {
    "transactions": 1000,
    "value": 5,
    "fanout": 3
  },
  "outputs": [
    {
      "label": "Correct revenue at transaction grain",
      "actual": 5000,
      "expected": 5000,
      "passed": true
    },
    {
      "label": "Repeated joined revenue",
      "actual": 15000,
      "expected": 15000,
      "passed": true
    },
    {
      "label": "Overstatement",
      "actual": 10000,
      "expected": 10000,
      "passed": true
    }
  ],
  "constraints": [],
  "formulas": [
    {
      "label": "Correct revenue at transaction grain",
      "javascript": "v.transactions*v.value"
    },
    {
      "label": "Repeated joined revenue",
      "javascript": "v.transactions*v.value*v.fanout"
    },
    {
      "label": "Overstatement",
      "javascript": "v.transactions*v.value*(v.fanout-1)"
    }
  ],
  "limits": "Never deduplicate revenue by amount alone: different legitimate transactions can share a price. Validate keys, join cardinality and aggregation order against a small inspected sample before trusting a repaired query."
}
