SQLise Studio · Examples
SQLise Examples
Real-world SQL examples with their column-level lineage rendered. Click any example, then SQLise it in the playground to explore.
bigquery
BigQuery Backfill Script
A BigQuery scripting block that loops over partitions and rebuilds a fact table. Lineage shows partition-by-partition flow into one mart.
snowflake
dbt Incremental Events Model
A compiled dbt incremental model that appends new events. Lineage shows the source events table feeding the incremental sink with a watermark filter.
snowflake
dbt Staging Model Lineage
Compiled SQL from a typical dbt staging → intermediate → mart layering. Column lineage shows source freshness from source tables to mart columns.
postgresql
Ecommerce Revenue Lineage
A typical ecommerce revenue model: orders join customers and order_items, then roll up into a daily revenue view. See how each output column traces back to its source tables.
postgresql
LATERAL JOIN — Top-N per Group
Get the top 3 most recent orders per customer using LATERAL. Lineage shows the lateral subquery as a stage between customers and the result.
snowflake
Marketing Attribution Lineage
First-touch attribution joining sessions, conversions, and campaigns. The lineage shows which session columns become which attribution columns.
snowflake
MERGE / UPSERT Pattern
A canonical MERGE that upserts staging rows into a dimension. Lineage exposes which target columns are sourced from which staging columns.
sqlserver
PIVOT Monthly Sales
A long-format sales table pivoted into one column per month. Lineage shows every Jan..Dec column tracing to the same amount source.
postgresql
Postgres JSONB Extraction
Project typed columns out of a JSONB payload and into a clean view. Lineage tracks every typed column back to the JSONB source.
postgresql
Recursive CTE Org Chart
Walk a manager → employee hierarchy with WITH RECURSIVE. The lineage view treats the recursive CTE as a self-referencing stage.
snowflake
Slowly Changing Dimension Type 2
Maintain a dim_customers SCD2 table from a staging snapshot. Lineage exposes both the active row and the closed-out historical row.
snowflake
Snowflake Time Travel Audit
Compare a Snowflake table to its state 24 hours ago using AT(OFFSET ⇒ -86400). Lineage shows the historical scan as a separate source.
snowflake
Snowflake Transformation Pipeline
Snowflake stage → stream → task → warehouse table. See lineage across data-flow primitives, not just SELECTs.
sqlserver
SQL Server MERGE with OUTPUT
A SQL Server MERGE that captures changed rows using the OUTPUT clause. Lineage covers both the target table and the audit table.