Concept and mechanism
A row should represent an entity or event with defined identity. Repeating fund attributes in every position can produce contradictory updates; a fund table referenced by key makes that dependency explicit. Queries project columns and expressions over these relationships. DISTINCT removes repeated projections rather than automatically identifying duplicate business movements. If only amount is projected, different movements with the same amount can become one row. NULL represents missing or unknown information: ordinary arithmetic with NULL yields NULL and absence is tested with IS NULL. Current Oracle semantics treat zero-length text as NULL, while a space is an actual character. Preserve this distinction when validating imported identifiers.
Guided application
In a fictional report, first state the intended population: included funds, accepted statuses, and each row’s unit. Use parentheses to clarify combinations of AND and OR. Text literals use single quotes; delimited identifiers use double quotes and may require exact case. An alias improves presentation without changing data. Concatenation constructs text and has its own NULL behavior, so do not generalize the arithmetic rule to every operator. To obtain a stable page, define ORDER BY with a unique tie-breaker before limiting rows. Test equal amounts, missing values, and ties to demonstrate that the result meets the agreed rule.
SELECT movement_id, amount FROM movements WHERE fund_id = 17 AND status IN ('PENDING','FAILED') ORDER BY movement_id
Common pitfalls
DISTINCT as business deduplication; NULL as zero; physical order as contract; double quotes as text.
Related topics: Functions, conversions, and data contracts · Joins, grain, and aggregation · Subqueries, sets, and top-N
Validate identity, population, and order before interpreting results.
Reference: Selection ordering and row limits · 1Z0-071 public objectives inspected 2026-09-30; revision date not published