Last-mile 1Z0-071 review: high-yield Oracle SQL rules and examples for joins, NULL semantics, grouping/aggregation, subqueries, set operators, and DDL/DML basics.
Use this for last‑mile review. The exam rewards precision about NULLs, join semantics, and grouping.
1FROM -> WHERE -> GROUP BY -> HAVING -> SELECT -> ORDER BY
NULL is not equal to anything (even NULL).IS NULL / IS NOT NULL (not = NULL).WHERE filters can turn into an inner join if you filter on the right table incorrectly.| Problem | Symptom | Fix |
|---|---|---|
| Duplicate amplification | too many rows after join | join keys not unique |
| Wrong outer join filtering | missing rows | move filter into join condition or handle nulls |
| Wrong granularity | totals are off | aggregate before joining or join at correct level |
1SELECT
2 dept_id,
3 SUM(CASE WHEN status = 'ACTIVE' THEN 1 ELSE 0 END) AS active_count
4FROM employees
5GROUP BY dept_id;
WHERE filters rows before grouping.HAVING filters groups after aggregation.| Need | Pattern |
|---|---|
| Filter by related existence | EXISTS |
| “Not in set” with null-safe behavior | NOT EXISTS (often safer than NOT IN) |
| Top‑N per group | window function + filter (concept-level) |
COMMIT persists; ROLLBACK reverts uncommitted changes.