CertSafari
    Snowflake SnowPro Advanced: Data Analyst (DAA-C01)· Lessons

    Domain 3 · Lesson 14/19

    Descriptive analysis in Snowflake: worksheets, notebooks and dashboards

    Perform descriptive analyses.

    20 min read
    8% of exam
    9 sources
    Published 20 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Summarize a column's center and spread with MEDIAN and STDDEV, and predict what they return for even counts, NULLs and single rows
    • Read a worksheet result with the inspector's contextual statistics and chart aggregations, and know which result transformations cost compute
    • Pass results between SQL and Python cells in a Snowflake Notebook and chart them inline
    • Lay out dashboard tiles so they describe a dataset at a glance, including several views of one query
    • Drive every tile from one control with :daterange and :datebucket, and define a reusable custom filter that compares segments

    Key concept

    Descriptive analysis — Describing what a dataset looks like now: how many rows, where the values center, how widely they spread, and which values come up most often. In Snowflake you do it ad hoc in a worksheet or notebook, then keep it on a dashboard where filters change the slice without anyone editing SQL.

    1.Center and spread with SQL aggregates

    Descriptive analysis is usually the first thing you do with a dataset, before you diagnose or forecast anything. You answer what is in the data: how many rows there are, what a typical value is, and how far values stray from it. A SQL worksheet is the quickest place to start. Set a database and schema as the worksheet context, and the ad-hoc statements that follow can name tables without qualifying them. When an analyst writes SALES_DB.PUBLIC.ORDERS over and over, the context selector is the fix.

    MEDIAN gives you a center that outliers can't drag around. It takes a numeric expression and ignores NULLs. With an odd number of non-NULL values it returns the middle one. With an even number it returns the average of the two middle values, so for 1, 3, 5 and 20 the answer is 4. If every value is NULL, or there are no rows, it returns NULL. MEDIAN(DISTINCT v) is not allowed. MEDIAN also works as a window function with PARTITION BY, but the OVER clause can't contain an ORDER BY or an explicit window frame.

    Sample rows from the MEDIAN reference. Grouped by k, the median is 20 for group 1 (odd count), 22.5 for group 2 (average of 20 and 25), and NULL for group 3, which holds only NULLsql
    INSERT INTO aggr VALUES (1, 10), (1, 20), (1, 21);
    INSERT INTO aggr VALUES (2, 10), (2, 20), (2, 25), (2, 30);
    INSERT INTO aggr VALUES (3, NULL);

    STDDEV and STDDEV_SAMP are two names for one function. Both return the sample standard deviation of non-NULL values as a DOUBLE. If you want the population version, use STDDEV_POP. Unlike MEDIAN, STDDEV accepts DISTINCT. A VARCHAR argument is implicitly cast to floating point, and the query errors if that cast fails. The single-record NULL catches people out in segment summaries: a region with one order shows a blank spread, not a zero. It also differs from Oracle, where STDDEV returns 0 for a single record.

    Checkpoint 1 of 9· Check yourself

    An analyst exploring order data in a SQL worksheet keeps typing SALES_DB.PUBLIC.ORDERS in every ad-hoc MEDIAN and STDDEV query. What lets them write just ORDERS instead?

    Sources123

    2.Reading a result with the worksheet inspector

    Some questions don't need a single aggregate query. After SELECT * FROM customers, you can select a column, a range of cells or whole rows in the results table, and the inspector pane on the right fills with statistics for that selection. It gives an overview of every column, and selecting a column header opens that column's detailed statistics. You can also filter the result by clicking items in the pane.

    What the statistics pane shows, by column type
    Column typeStatistic shownWhat it tells you
    Every columnFilled/empty meterHow many rows are populated, plus invalid rows for types such as email and JSON
    Date, time, numericHistogramHow many rows fall in each range. Click a bar or drag across it to select a range
    Categorical (text with repeated values)Frequency distributionWhich values are most common
    EmailEmail domain distributionHow often each domain name occurs
    JSONKey distributionThe top keys across rows, or the relative value types if the column holds arrays

    Statistics are generated for results of up to 1 million rows. So the spread of signup_date comes from its histogram and the common values of plan_tier from its frequency distribution, with no extra query. Accounts in U.S. government regions, VPS accounts, and accounts on Private Connectivity still have results capped at 10,000 rows.

    Changing the result can cost compute. Sorting a column from its column options applies to the whole result, not just the rows on screen, and runs on the same warehouse as the original query. Display-only changes are free: a thousands separator, percentage display, decimal precision, and date or timestamp formatting. To find the transformations that did run, filter Query History for SQL text containing snowsight_transform_cte.

    Selecting Chart turns the same result into a bar chart, line chart, scatterplot, heat grid or scorecard. When a chart buckets data, for example daily rows rolled up to weeks or months, or numbers grouped into integer buckets, it collapses each bucket to one value with an aggregation: average, count, minimum, maximum, median, mode or sum. These are chart settings, so you can change the summary without touching the SQL. A query shows one chart type at a time.

    Checkpoint 2 of 9· Match them up

    After you run SELECT * FROM customers in a worksheet, the inspector pane shows a different statistic for each column type. Match each column type to the statistic it gets.

    Tap a term, then the definition that fits it.

    Sources34

    3.Exploratory analysis in Snowflake Notebooks

    Use a notebook when the analysis mixes languages. You might pull a monthly summary in SQL, reshape it in pandas, chart it, and write notes beside the result. A notebook holds Python, SQL and Markdown cells in one document that runs cell by cell. In the warehouse runtime it comes with pandas, numpy, Snowpark, Streamlit and Altair already installed. In the newest accounts, the next-generation version of this experience runs inside Workspaces.

    Cells pass results by name. The name of a SQL cell becomes a Python object in later cells: cell1.to_df() returns a Snowpark DataFrame and cell1.to_pandas() returns a pandas DataFrame. Going the other way, a SQL cell references a Python variable or another SQL cell with double braces. Names are case-sensitive and must exactly match the cell you mean.

    Reference syntax between notebook cells
    FromIntoSyntaxExample
    SQL cellPython cellcell namemy_df = cell1.to_pandas()
    SQL cellSQL cell{{cell2}}SELECT * FROM {{cell2}} where PRICE > 500
    Python string used as a valueSQL cell'{{variable}}' in quotesSELECT * FROM my_table WHERE COUNTRY = '{{c}}'
    Python string used as an identifierSQL cell{{variable}} without quotesSELECT * FROM my_table WHERE {{column_name}} = 'USA'

    References into SQL work only with Python strings. A pandas or Snowpark DataFrame can't be placed inside {{ }}. If a filtered DataFrame needs to go back to SQL, persist it or rebuild it as a query. Don't try to template it in.

    Charts render directly under the cell. Altair is the shortest route because it is imported by default as part of Streamlit, so a SQL result converted with to_pandas() can go straight into alt.Chart. Streamlit chart elements such as st.bar_chart also work with no setup. Matplotlib, plotly and seaborn must first be added from the notebook's Packages menu, and adding a package means restarting the session.

    Stacked bar chart in an Altair Python cell, drawn from a DataFrame named dfpython
    import altair as alt
    alt.Chart(df).mark_bar().encode(
        x= alt.X("measurement", axis = alt.Axis(labelAngle=0)),
        y="value",
        color="species"
    )

    Output limits affect what you see, not what you can compute. A DataFrame displays at most 10,000 rows or 8 MB, whichever is lower, but the whole DataFrame stays in the session for later cells. A single cell's output is capped at 20 MB and is dropped above that, so split heavy output across cells.

    Checkpoint 3 of 9· Check yourself

    A Python cell builds a DataFrame of 2 million rows, and the notebook shows only the first 10,000. What is true of the rest of the data?

    Sources567

    4.Summary tiles that describe a dataset at a glance

    A dashboard is where a descriptive summary lives once the ad-hoc work is done. Snowsight dashboards built from tiles arrange chart and table tiles, each driven by its own query. For a descriptive dashboard, put the headline numbers (row count, median order value, spread) in scorecard tiles along the top. Put distributions in bar charts or heat grids below them. Drag tiles into that order, since new tiles always land at the bottom.

    Because one query shows one chart type, two views of the same result need two tiles. For a table tile, open Edit Query, select Chart, and return to the dashboard. That adds a chart tile built from the same query at the bottom. Duplicate Tile copies a tile, and you can then give the copy a different chart. Moving a worksheet onto a dashboard takes it out of the worksheet list, and anyone it was shared with loses access.

    Removing a tile: two actions with very different results
    ActionTileUnderlying query
    Unplace TileRemoved from the layout, but still available from the Add tile menuKept
    DeleteRemoved permanently, along with any other tile built on the same queryDeleted, cannot be undone

    Dashboard queries run in their own sessions with an assigned role and warehouse, set in the dashboard's context selector. Run refreshes every tile. To view a shared dashboard, a user needs the same role as those sessions, and dashboards always run with the user's primary role, never secondary roles.

    Checkpoint 4 of 9· Check yourself

    On a descriptive dashboard, a table tile showing median order value also feeds a chart tile, created through Edit Query > Chart. The owner wants the table tile off the layout for now and may want it back next quarter. The chart tile must keep working. Which action fits?

    Sources8

    5.One date control for every tile

    Filters let viewers re-slice a dashboard without editing SQL: a keyword such as :daterange sits in the query, and the viewer's dropdown choice decides what it becomes. Snowflake resolves the keyword to a subquery or a list of values before the query runs. A selected item turns the predicate into <col> = <item>, several items into <col> IN (...), and an All option into true. That rewrite is why the pattern is rigid. A filter works only as the right side of an equals comparison, such as WHERE O_ORDERDATE = :daterange, or in a SELECT list as :datebucket(col). LIKE and CONTAINS fail, and a filter can't be used inside a stored procedure or a UDF. Stick to column = :keyword in tiles. Every role gets two system filters, and they can't be edited or dropped.

    :daterange filters a column to a window such as Last day, Last 7 days, Last 28 days, Last 3 months, Last 12 months, All time, or a custom range. It defaults to Last day and always uses UTC, whatever TIMESTAMP_INPUT_FORMAT is set to. :datebucket groups aggregates by Second, Minute, Hour, Day, Week, Month, Quarter or Year, and defaults to Day.

    Both system filters in one query. Put the same WHERE predicate in every tile's query, and the dashboard's single date-range control moves them all togethersql
    SELECT
      COUNT(O_ORDERDATE) as orders, O_ORDERDATE as date
    FROM
      SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS
    WHERE
      O_ORDERDATE = :daterange
    GROUP BY
      :datebucket(O_ORDERDATE), O_ORDERDATE
    ORDER BY
      O_ORDERDATE
    LIMIT 10;

    When six tiles each contain = :daterange, one change of the date control reruns all six over the new window. Hard-coded BETWEEN boundaries, session variables and per-period views all mean someone edits SQL or repoints tiles every time. Filter values have two buttons. Apply reruns with a value just for you, for example to look across All time once. Save stores the value as the default that viewers get, so you can keep a cheap Last 7 days as the starting point.

    Checkpoint 5 of 9· Fill the gap

    A dashboard has six tiles, and all of them should move together when a viewer changes the single date-range control. Which keyword completes the WHERE predicate that each tile's query needs?

    SELECT
      COUNT(O_ORDERDATE) as orders, O_ORDERDATE as date
    FROM
      SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS
    WHERE
      O_ORDERDATE =  ? 
    GROUP BY
      :datebucket(O_ORDERDATE), O_ORDERDATE
    ORDER BY
      O_ORDERDATE
    LIMIT 10;

    Checkpoint 6 of 9· Exam question

    A retail analyst has a Snowsight dashboard with six tiles that all filter orders by order date. Managers want one control that changes the date window for every tile without anyone editing SQL. What should the analyst do?

    Sources9

    6.A reusable filter for comparing segments

    A custom filter answers questions like "how does the median basket in EMEA compare with APAC?" without a second query. Custom filters work like the system ones: write WHERE region = :region once in each tile, then switch segments from a dropdown and watch every statistic recompute. A custom filter is defined once for the whole account. Anyone in the account can see and use it on any dashboard or worksheet, and the role attached to it does not limit who sees it.

    Only certain roles can create filters. An ACCOUNTADMIN grants filter-creation permission to roles, and only in Snowsight. A filter is defined in the Filters dialog (Manage Filters in a worksheet) and needs these settings:

    Custom filter settings
    SettingWhat to enter
    Display NameThe label viewers see on the filter
    SQL KeywordA unique keyword in the form :<string> with no spaces, for example :region
    RoleA role allowed to create filters. It runs the options query
    WarehouseRefreshes query-based options. The filter's role needs USAGE on it
    Options viaQuery (returns name and value, optionally description, one row per option) or List (name/value pairs typed in, Text or Number)
    TogglesMultiple values can be selected; include an All option; include an Other option

    A query-based filter can run only one query, so name and value must come from the same statement. That query runs as the user who created or last changed the filter, and every account user can see the dropdown, so keep sensitive values out of it. The option list refreshes hourly by default, or daily or never. The schedule spends warehouse credits even when nobody has the filter open, so a region list that rarely changes should refresh daily or never.

    Checkpoint 7 of 9· Match them up

    You're defining a region filter in the Snowsight Filters dialog so that every tile can switch between EMEA and APAC. Match each setting to what it controls.

    Tap a term, then the definition that fits it.

    Checkpoint 8 of 9· Exam question

    An analyst creates a query-based custom filter in Snowsight so dashboard viewers can pick a product category from a dropdown. Which two requirements must hold for the filter's options to populate correctly? Select TWO.(Select 2)

    0 of 2 selected

    Checkpoint 9 of 9· Exam question

    A team wants a reusable custom filter so analysts can restrict any tile to one region. Which statements about defining and using the filter are correct? Select TWO.(Select 2)

    0 of 2 selected

    Sources9

    Practise it for real

    Build a descriptive dashboard tile on the sample ORDERS data that one date control drives, and give it a second view.

    1. 1.Create a dashboard from Projects » Dashboards, select + and then New Tile from Worksheet, and paste the :daterange/:datebucket query against SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS.

      Why: The system filters are available to every role, so the tile needs no filter setup.

      You should see: The query runs over the default Last day window, bucketed by Day.

    2. 2.In the results, select the ORDERS column and open its statistics in the inspector pane.

      Why: Numeric columns get a histogram, which shows the spread without another query.

      You should see: A histogram of daily order counts that you can drag across to select a range.

    3. 3.Select Chart, choose Scorecard or Bar, then select Return to the dashboard.

      Why: The tile now summarizes the result visually instead of as raw rows.

      You should see: A chart tile at the bottom of the dashboard.

    4. 4.From the tile menu, select Duplicate Tile, and give the copy a different chart type.

      Why: One query shows one chart type at a time, so a second view needs a second tile.

      You should see: Two tiles side by side showing different views of the same data.

    5. 5.Change the date range filter to a longer window and select Apply, then switch back to a short window and select Save.

      Why: Apply changes only your view. Save sets the default that viewers get.

      You should see: Both tiles rerun over each window, and the saved short window is the default.

    Sources

    (9)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “If the number of non-NULL values is an even number, this returns a value equal to the average of the two center values.”
      ↩︎ Center and spread with SQL aggregates
      “DISTINCT is not supported for this function.”
      ↩︎ Center and spread with SQL aggregates
    2. 2.
      “STDDEV and STDDEV_SAMP are aliases for the same function.”
      ↩︎ Center and spread with SQL aggregates
      “For single-record inputs, STDDEV and STDDEV_SAMP both return NULL.”
      ↩︎ Exam trap 1
      “For single-record inputs, STDDEV and STDDEV_SAMP both return NULL.”
      ↩︎ Prediction
    3. 3.
      “you can reference objects in the schema without fully qualifying the object names in your query.”
      ↩︎ Center and spread with SQL aggregates
      “you can review generated statistics that display contextual information for any selection”
      ↩︎ Reading a result with the worksheet inspector
      “Categorical columns are text columns where the same values are used more than once.”
      ↩︎ Reading a result with the worksheet inspector
      “the changes affect all of your results”
      ↩︎ Reading a result with the worksheet inspector
      “The statistics are intended to help you make sense of your data at a glance.”
      ↩︎ Key concept
      “as the worksheet context, you can reference objects in the schema without fully qualifying the object names in your query.”
      ↩︎ Checkpoint
      “Displayed for all categorical columns. Categorical columns are text columns where the same values are used more than once.”
      ↩︎ Checkpoint
    4. 4.
      “Charts use aggregation functions to determine a single value from multiple data points in a bucket.”
      ↩︎ Reading a result with the worksheet inspector
      “Each query supports one type of chart at a time.”
      ↩︎ Reading a result with the worksheet inspector
    5. 5.
      “an interactive, cell-based programming environment for Python, SQL, and Markdown”
      ↩︎ Exploratory analysis in Snowflake Notebooks
      “Notebooks in Workspaces is the next generation of Snowflake Notebooks”
      ↩︎ Exploratory analysis in Snowflake Notebooks
    6. 6.
      “The cell name of the reference is case-sensitive and must exactly match the name of the referenced cell.”
      ↩︎ Exploratory analysis in Snowflake Notebooks
      “However, the entire DataFrame is still available in the notebook session for use.”
      ↩︎ Exploratory analysis in Snowflake Notebooks
      “In SQL code, you can only reference Python variables of type string.”
      ↩︎ Exam trap 2
    7. 7.
      “Altair is imported by default on Snowflake Notebooks as part of Streamlit.”
      ↩︎ Exploratory analysis in Snowflake Notebooks
    8. 8.
      “Dashboards are flexible collections of charts arranged as tiles.”
      ↩︎ Summary tiles that describe a dataset at a glance
      “A new tile is added at the bottom of the dashboard with a chart view of the table.”
      ↩︎ Summary tiles that describe a dataset at a glance
      “To view shared dashboards, the Snowflake user must use the same role as the session context for the queries that drive the dashboard.”
      ↩︎ Summary tiles that describe a dataset at a glance
      “Deleting a tile from a dashboard also deletes the underlying queries.”
      ↩︎ Exam trap 3
      “select Unplace Tile. The tile is removed from the dashboard, but remains available to add to the dashboard from the Add tile menu.”
      ↩︎ Checkpoint
    9. 9.
      “Filters are implemented as special keywords that resolve as a subquery or list of values”
      ↩︎ One date control for every tile
      “You can only use an equals sign as the comparator for a filter, and as such, cannot use a filter with LIKE or CONTAINS.”
      ↩︎ One date control for every tile
      “You cannot use a filter in a stored procedure or a user-defined function (UDF).”
      ↩︎ One date control for every tile
      “These filters cannot be edited or dropped.”
      ↩︎ One date control for every tile
      “The date range filter always uses the UTC time zone and is not affected by the TIMESTAMP_INPUT_FORMAT parameter.”
      ↩︎ One date control for every tile
      “then select Save to save that default filter value for dashboard users.”
      ↩︎ One date control for every tile
      “Custom filters let you change the results of a query without directly editing the query.”
      ↩︎ A reusable filter for comparing segments
      “Use the format :<string>, without spaces.”
      ↩︎ A reusable filter for comparing segments
      “The owner role for the filter must have the USAGE privilege on the warehouse you select.”
      ↩︎ A reusable filter for comparing segments
      “You cannot run multiple queries to generate the list of filter options”
      ↩︎ A reusable filter for comparing segments
      “will run the underlying query according to the configured schedule, even if no user has the filter open”
      ↩︎ A reusable filter for comparing segments
      “Anyone in your account can view and use a custom filter after it is created.”
      ↩︎ Exam trap 4
      “Must return the columns name and value.”
      ↩︎ Prediction
      “select a role to associate with the filter and run the query used to populate filter values”
      ↩︎ Checkpoint

    Ready to test yourself?

    Practise the 29 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.