ApiaryActiveLive
Try: pause · settings · learn · wipe
← Community / Reading Room
NN
applied-measurement · 25 min read

No Numeric Invoice Line Is Not a Zero Invoice

By Austin Little

By Austin Little

A blank price tag, three paper receipts and a calculator. (generated editorial illustration; not documentary evidence)
A blank price tag, three paper receipts and a calculator. (generated editorial illustration; not documentary evidence)

The volunteer who closes a materials ledger sees one invoice listed at zero. It might be a real zero: a hardware store donated a pack of fasteners and recorded no charge for it. It might mean the crew logged a purchase but has not entered the amount. It might mean the invoice header was created for a job that never submitted any lines. Those are three different records to review. A query that turns them all into the same currency-formatted zero makes the harder decisions invisible.

The simplest defense is to take counts as well as a sum. Count the source lines, count the lines with amounts, and preserve the total that was actually computed. Then attach a concise, explicit status. The status can distinguish the absence of lines from the absence of numeric amounts. It can also describe a subtotal when some but not all amounts are known. A genuine zero can then appear as a number without pretending that every instance of an empty amount is worth nothing.

This is a data interpretation problem, not a request to make the arithmetic more elaborate. SQLite can return an empty-input zero with one aggregate and a null with another. Both have sensible uses. Neither aggregate can independently characterize an invoice's provenance. The query and the display need to preserve that provenance before deciding what to show to the person closing the ledger.

Three states that look alike on a report

Start with a header for a volunteer workday. Someone has authorized a materials register but has not supplied any receipt lines. If the intended universe includes that header, an audit can say that the invoice has no matching source lines. It cannot say that its materials cost is zero. A header and a record of an amount are separate things. The absence may reflect timing, an unneeded register, or a missing feed. Avoid guessing which until other evidence clarifies it.

In the second state, there are source rows. A volunteer recorded pipe clamps and brackets, but both amounts are null. Staff can verify that someone identified the materials, but not what either line cost. This is different from the first state because a row review has something concrete to follow up. Replacing every null with zero would tell the volunteer that the costs were already accounted for, which is exactly what the ledger does not know.

In the third state, a numeric zero is explicitly recorded. That might happen when a supplier donated an item or when a charge was reported as zero under a documented rule. Zero is a value. It can contribute to a count of numeric amounts without increasing the sum. However, the number alone need not explain why the line is zero. The reason belongs in supporting data or a note where the project needs that distinction.

Add a fourth, common state: some lines have values and others do not. A sum over the values can be useful as a subtotal. It is not the complete invoice total unless the accounting rules say that the remaining lines are legitimately excluded. If a display shows twenty dollars with no sign that two entries are unresolved, a downstream report may treat the subtotal as a finalized amount. Both the usable arithmetic and the incompleteness should survive.

A net zero creates another twist. A charge and an equal credit can sum to zero even though neither line is explicitly zero. That is an invoice with known amounts that net to zero, not a set of free items. The number of explicit zero amounts can distinguish those cases when it matters. Separate the ledger's observations from its financial meaning: line presence, amount presence, and arithmetic result are not synonyms.

What the built-in functions actually report

The SQLite aggregate function documentation distinguishes the number of rows from the number of non-null argument values. In an aggregate over genuine source rows, the row count describes how many observations entered the group. Counting the amount expression instead describes how many of those rows have a non-null amount. A zero amount is non-null and counts. With deliberately typed input, the difference between the two counts tells you how many rows still have no numeric amount.

The qualifier about typed data matters. An amount column that can contain arbitrary text might have a non-null string that does not represent a number. The amount count would still count it. Prevent invalid data at ingestion or flag it separately rather than calling every non-null string a known amount. Similar caution applies if the expression performs a cast or fills a default. Count the actual information you intend to report, not a transformed value that conceals missingness.

The ordinary sum ignores null amounts and returns null when there is no non-null input. SQLite also provides a total aggregate that returns a floating-point zero in that situation. A numeric result from the total aggregate is convenient for some computations but removes the difference between an empty contribution and a known zero sum unless the query retains additional information. The choice is not about correct versus incorrect syntax. It is about whether the consuming layer needs to see what inputs existed.

The SQLite notes on NULL handling describe how null behavior interacts with SQL expectations and engine compatibility, including contexts which do not all treat nulls alike. Do not transfer a rule about distinctness, uniqueness, or display to aggregate interpretation without checking the actual function. In the ledger the key is to preserve the absence of an amount and count it deliberately. An equality test against null is not the way to identify that state; use an explicit null test where it is needed.

Total is specific to SQLite, and its floating-point return has separate implications for currency. Prefer a well defined exact representation for the ledger's source amounts, such as integers in a documented minor unit where suitable. Ordinary integer sums still have finite range, and aggregate behavior with floating values can differ. The fact that a number prints with two decimal places is not evidence that the arithmetic was exact. Choose the representation and amount rules before deciding how to format the totals.

Read the example as a set of nested counts

The volunteer materials register in this example has five source rows. Three have known numeric amounts. One of those three explicitly records zero. These counts answer three different questions, though all use the same unit: records. Neither the count of known amounts nor the count of zero amounts tells you the sum of the known costs.

Input rows and known amounts

Measurerecords
Rows in register5
Amounts present3
Explicit zero amounts1

Illustrative only. Invented values, not taken from a source dataset or an official target. The SQLite aggregate function documentation supports the method, not the counts.

The zero row is included among the amounts present, and the amounts present are included among the registered rows. The three bars must not be added together. Their differences have a clearer meaning. Five less three leaves two rows without amounts. Three less one leaves two known nonzero amounts. This tells a volunteer where to focus a row review without guessing what the nonzero values are or why one line was free.

To make a concrete companion scenario, imagine the known amounts are 1500, zero, and 600 in integer cents, with the other two entries null. The known subtotal is 2100 cents, or twenty-one dollars. This is one possible set of values behind the illustrative counts, not the only one. If a later receipt adds a missing amount, the count and subtotal can change. A later explicit zero can complete one line without changing the subtotal. That is a useful check of whether the report is preserving more than arithmetic.

Keep the word “register” local to the intended input. If the chart counts source receipt lines, do not substitute the output rows of a join that might duplicate lines or add placeholders. A reviewer should be able to identify the exact five line identifiers in the example fixture. A visual count and a machine-generated count are comparable only if they refer to the same collection of records.

Keep invoice headers when source lines may be absent

If a report groups only the line table by invoice identifier, invoices with no lines do not produce groups at all. This differs from an aggregate over zero rows without a grouping key, which can return a summary row with the applicable empty-input behavior. Understanding why a header vanishes is as important as interpreting a null sum. To show all expected invoices, start from the invoice universe rather than assuming it can be recovered from the line register.

A left join is a common way to retain the headers. Here there is a common counting trap. The join produces a preserved output row for a header with no matching line, with right-hand columns null. Counting every joined row with the star aggregate gives one for this header, but that one is the preserved header representation, not a receipt line. Count a genuinely non-null right-side line key or aggregate genuine source lines before joining.

The key has to identify a line reliably and be non-null when a line exists. Counting a nullable description or amount instead would cause another error: a real source line with missing description or amount would not be counted. The schema and the calculation should carry the same definition of a source row. When several kinds of contributions are joined, identify the grain of every intermediate relation. A record's existence should not depend on whether an optional field happened to get filled in.

If you aggregate lines first, the exact meaning of the nulls changes after the join. An invoice with no summary row receives null placeholders for all the summary columns. Filling the summary counts to zero is reasonable once the join semantics are understood, because the absence of a summary means no matching rows under that filter. Filling the sum to zero without status would lose the distinction again. Normalize the counts and preserve the amount information separately.

Filter placement can undo the benefit of starting at the headers. A condition placed in the final filter that requires a right-hand row often eliminates rows retained by a left join. A scoped line aggregation or an appropriate join condition is usually a clearer way to say which lines are eligible while preserving the intended invoice universe. This is not a reason to blindly move every filter. Decide whether the condition limits expected invoices, eligible lines, or results presented to users.

For example, an invoice may have three lines in the full register but none in the selected accounting period. A period report showing zero matching lines is correct for that query. It should not send a message that the invoice has never had any lines. The distinction belongs in the provenance label or report heading. “No matching lines under current filters” is often more accurate than “no lines” when reviewers can change dates or categories.

An auditable query structure

A practical implementation can summarize the line input at invoice grain and then attach that summary to the header. The following illustration assumes that invoice identifiers are unique in the header and that the nullable amount column stores only integer cents when present. It is a demonstration of data correctness, not a claim about the reader's schema.

WITH line_summary AS (
  SELECT invoice_id,
         COUNT(*) AS source_rows,
         COUNT(amount_cents) AS known_amounts,
         COUNT(CASE WHEN amount_cents = 0 THEN 1 END) AS explicit_zeros,
         SUM(amount_cents) AS known_subtotal_cents
  FROM materials_line
  GROUP BY invoice_id
)
SELECT i.invoice_id,
       COALESCE(s.source_rows, 0) AS source_rows,
       COALESCE(s.known_amounts, 0) AS known_amounts,
       COALESCE(s.explicit_zeros, 0) AS explicit_zeros,
       s.known_subtotal_cents,
       CASE
         WHEN s.source_rows IS NULL THEN 'no_source_rows'
         WHEN s.known_amounts = 0 THEN 'no_numeric_amounts'
         WHEN s.known_amounts < s.source_rows THEN 'partial'
         ELSE 'complete'
       END AS amount_status
FROM invoice_header AS i
LEFT JOIN line_summary AS s ON s.invoice_id = i.invoice_id;

The star count is safe within the summary because the intermediate relation contains genuine eligible source rows. The amount count ignores nulls. The conditional count counts zeros through a non-null sentinel returned only for the matching case; its other cases contribute null. Using a conditional expression that returned zero instead of null for nonmatching rows would cause those rows to be counted too. The final join retains invoice headers and marks which absence was actually observed.

The complete status does not assert that the invoice is approved, imported from a fully reconciled source, or balanced against the original bill. It says that each eligible row in the summary had an amount. A project that needs additional review states should introduce them explicitly. A status for amount coverage should not accidentally become a gold seal for distinct workflows. Even a known zero can be provisional if the source still needs confirmation.

The query intentionally keeps the known subtotal as a separate result. If every line is null and at least one exists, the row count is positive, the amount count is zero, and the subtotal is null. If no matching lines exist, the counts are set to zero while the subtotal is also null; the status differs. If every amount is a real zero, both counts are positive and equal, and the subtotal is numeric zero. A partially populated group with only known zeros yields a numeric zero subtotal and a partial status. That fourth test protects the handoff from confusing partial zero with complete zero.

If an application wants a conventional zero for a defined downstream arithmetic operation, keep that folded amount in a separate, clearly named field or compute it at the point of use. It can be legitimate to treat no known contribution as zero for constructing a partial register. It is not legitimate to claim the conversion measured the missing amounts. An export can retain original subtotal and status alongside a display or calculation field if the audience needs both.

Keep duplicate amplification from corrupting the count

The ledger may attach several comments, attachments, or tags to each receipt line. Joining all those tables before grouping can multiply one line across several related records. The sum may increase, and each of the counts can appear to tell a different story from the actual register. Review joins at their intended cardinality. If the report needs both line totals and attachment summaries, aggregate each at the appropriate grain before combining them.

A tempting patch is to compute a distinct sum of amount values. This is not a general fix for repeated rows. Two separate purchase lines can legitimately have the same price; removing one distinct value would drop genuine cost. Counting distinct line identifiers can be a useful diagnostic, but it does not by itself make the sum immune to duplication. Preserve line identity and establish one row per eligible line before summation when that is the policy.

Other duplication can enter through imports. Two records representing the same receipt might have different row identifiers, so technically counting source rows is correct while the business register is inaccurate. The remedy is a clear ingestion and reconciliation process, not arbitrary suppression whenever amounts match. Keep duplicate review distinct from missing amount review. One is about which physical or business lines belong to the ledger, the other about what is known for the lines already included.

A useful audit can compare expected line counts before and after a join, and check a few known cases with one-to-many relationships. Test a zero line with multiple attachments because zero duplication might leave the sum unchanged while damaging the counts. Test a nonzero line with the same amount as another real line to ensure the logic does not discard it. A financial-looking subtotal can conceal broken provenance even if the number happens to be right.

Prevent missing values from changing meaning on import

Source documents can express the absence of a price in several ways. A cell might be empty, contain a dash, or carry a note such as “amount pending.” A numeric zero may be printed with a currency sign. Do not translate all those strings to a default number. Parse them under explicit import rules and retain enough evidence to explain what each accepted or unaccepted value represents.

An empty string is not inherently null in SQLite. For an amount column that can store text, a non-null count can include both empty and nonnumeric strings. Even a displayed placeholder can be imported as literal data. A defensive design separates raw input from validated amounts, rejects or flags unsupported values, and exposes an amount status different from the raw entry's presence. Then a known amount means more than “the source delivered a nonempty field.”

Casting an ambiguous input is not data validation by itself. A permissive conversion can produce zero for text that did not provide a usable amount. Once that value enters the normalized finance column, later counts will correctly treat it as a number while the ledger is wrong about its origin. Validate expected forms and ranges ahead of conversion. Keep real zero from being silently created by parsing. Where project rules allow, require the normalized representation to be compatible with the intended type.

Certain contexts require distinguishing an amount deliberately left unavailable from an amount not yet entered. A line may be outside the reimbursable scope or supplied as in-kind support without a recorded price. The exact model depends on the ledger's purpose. An optional reason field or explicit schema states can capture more than null alone. Do not infer that distinction from whether the reviewer can remember the reason for a missing price.

Currencies need the same discipline. An amount is not just a string or a numeric magnitude. If lines can be in different currencies, aggregating integer cents across them does not produce a meaningful amount in any one currency. Group or convert according to documented rules, and treat unconverted lines as a separate status rather than quietly pooling them. A complete count of numeric amounts does not certify that all of those amounts are eligible to sum together.

The raw import, normalized record, and report can store different kinds of information. The raw import preserves the feed. The normalized amount stores what validation has accepted. The report states what eligible known amounts were added and which data remain unaccounted for. The boundaries make it possible to correct a parsing rule without pretending the source changed. They also permit follow-up with the person who knows why the document field was blank.

Use consistent language for zero, subtotal, and completeness

A report label can carry the distinction without teaching readers SQL. “No matching receipt lines” describes an empty group. “Three lines recorded, no amounts” identifies a different follow-up. “Known subtotal: twenty-one dollars; two amounts missing” preserves both numeric progress and incompleteness. “Complete line amounts, net zero” gives a concise picture for fully populated rows. A single “zero” cannot tell all four stories.

Do not make an amount column carry both a number and a status solely through formatting. A dash can be visually useful for missing figures, but a screen reader, exported CSV, or chart should be able to recover the reason. Retain a separate field or explanatory text accessible to the consuming interface. Use a real zero when the amount is known to be zero, and not merely to line up currency columns.

Labels should make clear what “complete” means for the report scope. If a full invoice is only partially imported but all the imported lines have amounts, the query can truthfully say that the matched lines are populated. It cannot assert that the full supplier invoice is present. This distinction is often uncovered when a header count is reconciled successfully but a line feed was truncated. Source coverage and field completeness are independent checks.

In some ledgers the empty state can be more actionable than the filled state. A header with no eligible lines can prompt a check that an expected feed arrived. Rows with null amounts may point the reviewer toward incomplete receipts. If the issue is an out-of-period filter rather than missing data, show that context so someone does not chase a nonexistent issue. Good labels steer the next action instead of simply describing a database convention.

Statuses can also be useful at higher levels. A weekly ledger total might combine several complete invoices, two partial invoices, and one unresolved header. A numeric sum over the known contributions is still valuable. It should be described as known across the available lines, with a count of incomplete or unseen groups. Avoid aggregating away the distinction one layer after carefully preserving it at the invoice level.

For such rollups, derive completeness from the relevant group states and registries, not only from a sum of counts. A project with multiple invoice groups might have many individually complete records and still have missing headers from a source feed. A summary can present known dollars and explicit scope without certifying business completeness. Make the reporting contract match the dataset's actual boundary.

Build tests that depend on status, not just money

Set up a small independent fixture with known invoices and line identities. Include a header with no lines, a header with all null lines, a header with one true zero, and a header with a mix of known and missing amounts. Include another with a positive amount and an equal negative amount. For each record write down expected line count, known amount count, explicit zero count, subtotal or absence of subtotal, and status. Test all of those outputs.

The empty and all-null cases are especially good tests of whether an implementation looked only at the raw sum. Both can return an absent subtotal, but the row counts and statuses should distinguish them. The true-zero and net-zero cases protect the meaning of the explicit zero count. The mixed case protects the label “subtotal.” If the fixture tests only whether the displayed figure is zero, it can pass several incorrect implementations.

Test filters and joins independently. Request a period without any eligible lines and verify whether the intended invoice universe remains visible. Add a related comment and verify that the totals do not change. Add one new zero amount to an incomplete invoice and check that populated count rises even if the subtotal remains the same. The verification should use durable line identifiers, not rely on the order in which SQLite happens to return rows.

Include import cases for blanks, invalid text, and explicit numeric zero. A test should confirm that invalid text is not treated as a settled zero. If the project retains why a field is unavailable, verify that the explanation survives the transformation and output. Record expected handling for unsupported currency or amounts too large for the representation, rather than finding out after a large batch is already summarized.

Check expected error behavior in addition to success. For integer amounts, aggregate sums can exceed the representable range under some data. A test or documented bound can make this failure visible instead of forcing a floating total and losing exactness. A program with fixed expected ranges can validate accordingly. Do not solve an overflow by increasingly trusting the number's appearance after conversion.

The fixture should also test the downstream export. A JSON client may turn null into zero with a default expression, or a spreadsheet may display a blank without its status even though the query is correct. Preserve the contract across boundaries and use test inputs designed to reveal semantic loss. The audit is not finished when one SQL console prints the intended rows if the person closing the ledger sees something different.

What a reconciliation can say that an aggregate cannot

A reconciliation starts with an external expectation. Maybe the supplier says that there are five line items on a delivery slip, or the coordinator has a register of which teams were expected to file. Comparing those expectations to received records can reveal omissions. The ledger's count only tells how many rows are currently represented under the query conditions. It cannot tell how many should have existed unless the expectation is included or checked independently.

For that reason, preserve an expected group even when no numerical contribution is recorded. A line list starting from the rows it successfully received cannot expose a missing invoice header. A report starting from a list of expected invoices can distinguish those that are present from those that are missing, then describe each present header's line coverage. One count cannot answer all of those questions. The report should name whether it covers submitted invoices, expected invoices, or invoices included under another defined rule.

Reconciliation also distinguishes approved corrections from ordinary updates. Suppose the volunteer finds that a missing price was already included as another line. The right action is to verify which source record represents the cost and then document the duplicate or mistaken entry under the applicable policy. Adding a zero to the unresolved line just to clear its missing status would create a false numeric record. A zero needs its own basis even when the overall total would not change.

There is a practical difference between editing a ledger and reviewing a computed view. In a review view someone can annotate why an amount is absent without rewriting the original records. In the ledger a corrected amount should be traceable to its supporting receipt or other authorized evidence. An aggregate can reveal where to look; it should not decide what the original document must have said. When these layers are separate, a reviewer can tell whether a changing report reflects newly entered amounts, changed selection rules, or a formal correction.

A reconciliation can be useful even if it never closes fully. Report which invoices were matched to supporting documents, which still have no matching lines, and which have known subsets of amounts. This lets a team avoid blocking all work because some records remain open. It also prevents the partial total from being mistaken for the amount due merely because the formatted figure looks exact.

Be explicit about the reporting boundary

A site can have several interfaces for the same data. An administrative screen may show raw line presence and incomplete amounts. A weekly dashboard may emphasize known material totals. A downloadable report might make all those fields available for analysis. These views can serve different needs if they retain the same meaning of a zero and the same provenance about incompleteness. The difference in audience does not justify changing what a record attests to.

In a service response, it is useful to distinguish absence of a field from a present field with a null value. A field omitted accidentally by an older version of an export is not necessarily the same as an explicitly reported unavailable amount. Document the contract and test the consumers. A numeric field and its evidence status can also disagree if someone defaults the number during conversion. Set expectations for both and make inconsistent combinations easy to detect.

Migration is a place where that distinction can be lost. An older table might use a placeholder zero whenever the amount was missing. A new schema with an explicit status cannot simply infer which historical zeros were genuine. If source documents can resolve particular cases, use them and retain the basis. Where the old system no longer permits a distinction, report an ambiguous historical state. A retrofit should not turn lack of knowledge into a better looking history.

For CSV and spreadsheet users, include a stable status code and a readable explanation where useful. Blank numeric cells can be imported as zeros, text, or missing values depending on the tool and options. Test at least one realistic downstream workflow rather than assuming every reader handles blanks the same way. If two display choices look alike visually, make the semantic distinction recoverable through the accompanying fields.

If the figure is used by itself, label the bars as related subsets of one register. The example's one explicit zero is among the three amounts present; it is not additional to them. The SQLite documentation supports the interpretation of the aggregate functions and did not provide the five, three, and one counts. Keeping the method source and data provenance separate avoids implying that a fictional ledger was measured by the source's authors.

Use the safer question when a request sounds underspecified

A common request is “show me invoice totals, including zero-dollar ones.” Before implementing it, ask which rows the requester intends to see and what should happen with unknown amounts. They may mean every invoice header, whether or not there are lines. They may mean only invoices whose known complete amounts net to zero. Those readings produce different filters, different explanations, and different follow-up work.

Another request is “fill blanks with zero so the chart works.” A chart may need a concrete baseline for positions or visual alignment. That can be a presentation convention, provided it does not replace the source amounts or mislabel bars. A status channel or text annotation can indicate unavailable values, and a data table can retain null and source counts. It is generally safer to change presentation than to rewrite the meaning of the underlying number.

When designing the fix, make the definition of absence testable. If the report promises that “no amounts” appears only when there are genuine rows and none has a numeric value, define tests for that combination and for the nearby ones. If it promises to include all expected headers, test an empty one. If it promises to use only validated cents, check invalid imports before any amount aggregation. A reliable report describes behavior independently of a particular query syntax.

A useful code review starts with one example that would change an operational decision. Imagine two invoices both displayed at zero. One has only confirmed donated items, and the other contains five entries awaiting documentation. A reviewer seeing only zero may close them both. Showing the second as unresolved supplies the missing next action without changing the arithmetic. That is the practical reason to retain the provenance flag.

Check what users can infer from the same summary

A dashboard user may sort by highest known cost because that is a useful way to prioritize receipts. That ordering should not imply that an invoice with no known values is cheaper than one with a numeric subtotal. An explicit sort group for unavailable values, or a filter by completeness, communicates the difference. Keep the sort rule documented wherever exported rows might otherwise look like a ranking of final costs.

An author should also test a link from the aggregate to underlying details. A row with five registered lines and three amounts should open a register showing the same five lines under the same filter. If a separate detail page uses a different date convention, the mismatch can make a correct count look broken. Provide the filter scope and time or data version where appropriate. An aggregate is much more credible when a reviewer can inspect what it counted.

Define behavior for a late update as well. A single previously missing amount may be confirmed as zero, leaving the known subtotal unchanged. A meaningful interface should still update its count and wording so a person can see that the investigation made progress. Conversely, an amount newly marked invalid can reduce known coverage without changing the underlying line count. Tests that watch only amount deltas will miss both cases. A completion indicator exists to keep the record's evidentiary state visible even when the money itself does not move.

The design is ready when an operator can tell whether to check for a missing source, fill a known line from evidence, or accept a documented zero. Those three next actions are a more useful acceptance test than checking that every cell happens to render as a number.

Closing a register is an exercise in evidence as much as bookkeeping. Counting genuine source rows establishes presence. Counting non-null amounts in a validated column establishes how many recorded values can contribute. A sum describes those contributions, and its status describes what the result does not cover. The toy register has five rows, three amounts, and one explicitly recorded zero. It does not say the missing amounts are zero. That distinction should survive every query, export, and screen between the original receipt and the person making the decision.

Frequently asked
What is No Numeric Invoice Line Is Not a Zero Invoice about?
By Austin Little
What should you know about three states that look alike on a report?
Start with a header for a volunteer workday. Someone has authorized a materials register but has not supplied any receipt lines. If the intended universe includes that header, an audit can say that the invoice has no matching source lines. It cannot say that its materials cost is zero. A header and a record of an…
What should you know about what the built-in functions actually report?
The SQLite aggregate function documentation distinguishes the number of rows from the number of non-null argument values. In an aggregate over genuine source rows, the row count describes how many observations entered the group. Counting the amount expression instead describes how many of those rows have a non-null…
What should you know about read the example as a set of nested counts?
The volunteer materials register in this example has five source rows. Three have known numeric amounts. One of those three explicitly records zero. These counts answer three different questions, though all use the same unit: records. Neither the count of known amounts nor the count of zero amounts tells you the sum…
What should you know about input rows and known amounts?
Illustrative only. Invented values, not taken from a source dataset or an official target. The SQLite aggregate function documentation supports the method, not the counts.
References & sources
  1. Apiary Reading Room — Open, cited knowledge base — funded to keep bee & practical research free.
From the Apiary Reading Room. Opinion & editorial — not financial advice. We don't overclaim.
More from the Reading Room