Video | Snowflake | Data engineering | Analytics

Using the History Page to Learn Queries - Snowflake

I'm still learning Snowflake, so let me show you my trick: do it in the interface, then steal the SQL it writes for you.

Part ofGetting Started with Snowflake
Watch on YouTube
  • Everything you do in the Snowflake interface generates an underlying SQL statement you can inspect and reuse
  • The Activity > Query History page shows the exact SQL Snowflake ran, including row limits like LIMIT 100
  • You can copy generated SQL into a worksheet to learn and re-run it, building up reusable scripts
  • Always highlight the specific line before hitting run to avoid executing your entire worksheet
  • You can switch between the modern Snowsight interface and the classic console, and save generated SQL to GitHub for reuse

You can learn Snowflake SQL without memorising syntax by performing actions through the interface and then inspecting the exact query Snowflake generated to do it. This turns the interface into a live teacher for writing your own reusable SQL.

Tim is still learning Snowflake and wants a low-friction way to pick up SQL syntax. He uses a Snowflake trial instance with the default sample databases to demonstrate the trick.

The Breakdown
  1. Switch between Snowsight and classic console 0:33

    You can toggle between the modern Snowsight interface and the older classic console (via a login and a button), running them side by side if needed. This is just a tip on navigating the UI, not a required step for the main trick.

  2. Perform an action through the interface first 1:27

    Do something you'd normally want to script — here, previewing a table's data — using the point-and-click interface rather than writing SQL by hand. Every interface action like this triggers a query behind the scenes, which is the basis for the whole technique.

  3. Find the generated SQL in Query History 2:21

    Go to Activity > Query History and you'll see the exact SQL statement Snowflake ran for your action, including details like row limits (e.g. a LIMIT 100 added automatically to previews). This is where you 'steal' the syntax.

  4. Copy it into a worksheet and re-run just that line 2:41

    Paste the generated SQL into a worksheet to learn from and reuse it. Always highlight only the specific statement you want before hitting run, otherwise you risk executing everything else in the worksheet by mistake.

  5. Repeat the pattern for other actions 3:30

    The same approach works for any interface action — Tim demonstrates it by creating a database via the UI, then dropping it, then checking Query History both times to capture the CREATE DATABASE and DROP DATABASE syntax generated.

  6. Reuse the captured SQL to redo the action manually 5:20

    Paste the captured CREATE statement into a worksheet, tweak details (like the database name), and run it to confirm it reproduces the same result you got through the interface — proving you've learned working syntax you can reuse.

  7. Build up a personal library of learned scripts 5:54

    As you repeat this across different tasks, save the working SQL snippets somewhere like GitHub so you build a growing, reusable reference of Snowflake syntax you've verified yourself.

Worth Knowing
  • Interface-generated queries can include limits you didn't ask for, like a LIMIT 100 added to data previews, so don't assume the copied SQL is unrestricted.
  • Highlighting only the line you want before hitting run matters because running the whole worksheet by accident can execute statements you didn't intend.
  • Some tasks will still require checking the documentation directly — this trick is a good starting point, not a full substitute for learning SQL properly.
Use It When

Reach for this when you're new to Snowflake (or any tool with a GUI-to-SQL relationship) and want to learn real, working syntax by doing familiar tasks in the interface rather than starting from a blank SQL editor.

How this Rollup was made provenance & method

A Rollup is drafted by AI from the video's transcript, then reviewed and edited by Tim. Everything used to produce this one is listed below — the model, the exact prompt, and the source video — so the process is transparent and reproducible.

Transcription
On-device — NVIDIA Parakeet v3 for recent videos, OpenAI Whisper large-v3 for earlier ones. The transcript never leaves the machine or gets published.
Drafting
Claude Sonnet 5 in the cloud, from that transcript.
Prompt
The exact Rollup prompt (v2) — the full system prompt, unedited.
Source video
Watch on YouTube
Drafted
5 July 2026 at 09:38
Reviewed & edited
5 July 2026 at 09:41 · by Tim Ngwena

Model + prompt + video is everything you'd need to recreate a Rollup like this yourself. The one thing we don't share is the transcript.

Rights. The video and its transcript are the property of TN Media Ltd. Unauthorised use or download is prohibited. © TN Media Ltd.