SQL recipes
Run and edit queries with their sample data included.
Lists & arrays
A little function. A whole new list.
Apply the same idea to every value. A lambda lets you describe the transformation right where you use it.
Guide recipe · Run to view results.
list_transform()↗Text & patterns
Turn a label into a useful key.
Trim the edges, normalize case, and replace runs of spaces. Small functions compose into a readable cleaning step.
Guide recipe · Run to view results.
Dates & time
Give your timestamps a rhythm.
Group events into calendar months with date_trunc. The same pattern works for days, weeks, and years.
Guide recipe · Run to view results.
JSON
Find the value inside the document.
Extract a JSON field directly as text, ready to use in the rest of your query.
Guide recipe · Run to view results.
json_extract_string()↗Aggregates
Find the middle of the story.
Compare the average with the median to see how an unusually large value changes your summary.
Guide recipe · Run to view results.
Files & tables
Make a small dataset from nothing.
A table function produces rows you can query. range starts at zero and stops before the upper bound.
Guide recipe · Run to view results.
range()↗