~/talk

How to write powerful SQL that's easy to maintain

links:none on file
slides:none on file

Starts from a real report example counting employees per department and shows refactors: use WITH clause for CTEs, collapse common joins into views, then replace views with SQL macros to parameterize thresholds and even table and column identifiers using table_t and columns_t. Explains table versus scalar macros, that macros return SQL text as a CLOB, and that macros can call macros. Demonstrates debugging with dbms_utility.expand_sql_text to reveal a copy paste bug (>= vs >) and verifies equivalence with set difference queries.

AI-written summary · about

  1. 0:00Intro
  2. 1:14Writing the query
  3. 4:10SQL Macros
  4. 8:06Demo
  5. 16:13Recap
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.