CertSafari
    Snowflake SnowPro Advanced: Data Scientist (DSA-C03)· Lessons

    Domain 2 · Lesson 8/16

    Snowsight statistics, percentiles and outlier checks for a business case

    Visualize and interpret the data to present a business case.

    13 min read
    6.75% of exam
    9 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Read the Snowsight results-grid statistics as evidence for a claim, and say which caveat goes with it
    • Turn a worksheet result into a bar, line, scatter, heat grid or scorecard chart that fits the business question
    • Describe spread and shape with exact and approximate percentiles, and flag outliers with Tukey fences in SQL
    • Make an outlier or data-quality rule a named, scheduled check with system data metric functions

    Key concept

    Evidence you can repeat — A business case built on data holds up only when every number in it can be produced again: a statistic read off a query result, a chart drawn from the same query, and an outlier rule written down as a function that runs on a schedule, not judged by eye once.

    1.Reading the results-grid statistics as evidence

    Your first evidence for a business case is already on screen after any worksheet query. The mechanics are covered under Snowsight automatic statistics and table profile. In short: select a column in the results grid and the inspector pane shows that column's statistics. Run SELECT * FROM churn_features, click a column header, and you have a profile of that column before writing any profiling SQL.

    Each part of the pane answers a different question a stakeholder will ask. The filled/empty meter answers "how much of this is missing?". It appears for every column, and for types such as email and JSON it also counts invalid rows. The histogram appears for numeric, date and time columns and shows how many rows fall in each range. A long tail on one side is your first sign that the average will mislead. Frequency distributions cover categorical columns, meaning text columns where the same values repeat, and they show which few values dominate.

    State the scope whenever you quote these numbers. The statistics describe the query result, not the table: they cover up to 1 million rows of results, and they update with whatever you select. If the query had a WHERE filter or a LIMIT, the histogram is the shape of that slice. "Churned customers in 2025 skew young" is a claim about the filtered result, and it should say so.

    Chart view is not a quicker version of this pane. When you switch to Chart, Snowsight builds one chart from the result columns. Each query supports one chart type at a time, so you never get a histogram of every column. For a per-column profile, use the inspector pane.

    Checkpoint 1 of 6· Check yourself

    You run SELECT * FROM churn_features WHERE signup_year = 2025 in a Snowsight worksheet. Before you write any profiling SQL, you want to know how many values are missing in tenure_months and how they are distributed. What is the quickest way to get this?

    Checkpoint 2 of 6· Exam question

    A data scientist runs SELECT * FROM churn_features in a Snowsight worksheet and wants a fast profile of each column (null share, distinct values, value distribution) before writing any profiling SQL. What should they do?

    Sources12

    2.Choosing a worksheet chart for the business question

    Snowsight turns a worksheet result into a chart in one click: run the query, then select Chart above the results table. Snowsight picks a chart type from the result to start with. You can switch the type, choose which columns feed it in the Data section, and style it in Appearance. Hovering over the chart shows the detail for each data point. Charts are useful in a business case because they make patterns and outliers visible to people who will never read the result grid.

    Pick the chart type from the question being asked, not from what looks best. Snowsight offers five types. Each fits one kind of question:

    Snowsight chart types matched to the question they answer
    Chart typeBusiness question it fitsExample
    Line chartsHow does a measure change over time?Daily order count from TPCH ORDERS, bucketed to weeks
    Bar chartsHow do categories compare on one measure?Revenue per region or per product line
    ScatterplotsDo two numeric measures move together, and which points sit apart?Order size against discount, with outlying orders standing out
    Heat gridsWhere does a measure concentrate across two dimensions?Orders by weekday against hour
    ScorecardsWhat is the single headline number?This month's median order value

    You can change the grain and the summary without editing the SQL. A per-day result can be re-bucketed to weeks, months or years for date columns, and to integer buckets for numeric columns. Each bucket is then reduced to one value with an aggregation: average, count, minimum, maximum, median, mode or sum. For skewed measures such as order value, choose median over average so a handful of very large orders doesn't lift the bar for the whole bucket.

    Two practical limits apply. The chart follows the query: if you rename a column the chart uses, the chart reports the column as missing until you point it at the new name. Charts also cost compute, because chart generation and data transformations in worksheets can use warehouse credits, so a chart redrawn over a large result is not free.

    Checkpoint 3 of 6· Check yourself

    A stakeholder wants a weekly trend line, but your worksheet query returns one row of order counts per day. You don't want to touch the SQL. What do you do in the chart?

    Sources2

    3.Spread, percentiles and Tukey fences in SQL

    Averages and standard deviations describe a symmetric distribution well and a skewed one badly. The SQL is covered under Descriptive statistics in SQL (MIN, MAX, AVG, STDDEV, VARIANCE). For stakeholders, put those numbers next to the median and a few percentiles. MEDIAN(amount) gives the middle value, and percentiles give the quartiles and the tail. The median is the number to quote for a typical customer, because outliers drag the mean and leave the median almost unchanged. The reasoning is in Normal vs skewed distributions; mean vs median under outliers.

    PERCENTILE_CONT(p) WITHIN GROUP (ORDER BY col) returns the exact percentile of a continuous distribution. When no row sits exactly at the requested percentile, it interpolates linearly between the two nearest values. It ignores NULLs, and p must be a constant between 0.0 and 1.0. The output below includes interpolated values: group 1 holds only 10 and 20, so its 25th percentile is 12.5.

    Exact 25th percentile per group with PERCENTILE_CONTsql
    SELECT k, PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY v)
      FROM aggr
      GROUP BY k
      ORDER BY k;

    APPROX_PERCENTILE(expr, p) is the function to use when the table is huge and a small error is acceptable. It uses an improved version of the t-Digest algorithm, which estimates percentiles in a constant amount of space whatever the size of the input. For a dashboard tile showing the 95th percentile of order_amount over 4 billion rows, APPROX_PERCENTILE(order_amount, 0.95) is the right call. PERCENTILE_CONT is the exact function, not the estimate. And there's no need to pull the data into pandas, because both run inside Snowflake. The caveat to give stakeholders is that the size of the data and its skew both affect accuracy, and the returned value may not be any real order amount.

    Tukey's rule uses quartiles, so it holds up on skewed data where a mean-and-standard-deviation rule doesn't. Compute Q1 and Q3 with PERCENTILE_CONT(0.25) and PERCENTILE_CONT(0.75), and take the interquartile range IQR = Q3 - Q1. Then flag every row below Q1 - 1.5*IQR or above Q3 + 1.5*IQR. Three tempting alternatives get it wrong. AVG ± 1.5*STDDEV is a different rule, and the outliers it is meant to find inflate both of its inputs. A multiple of MODE treats the most frequent value as the centre. A band next to MIN and MAX flags whatever is at the edges, whether or not it is unusual.

    Checkpoint 4 of 6· Exam question

    A table orders holds 4 billion rows. An analyst needs the 95th percentile of order_amount for a dashboard tile and can accept a small estimation error, while keeping runtime and warehouse cost low. Which approach is MOST appropriate?

    Checkpoint 5 of 6· Exam question

    A fraud team stores transaction amounts in txns(amount). A data scientist wants to flag outliers with Tukey's rule (values more than 1.5 × IQR beyond the quartiles) using only SQL in Snowsight. Which approach implements this correctly?

    Sources3456

    4.Naming the outlier rule with system data metric functions

    A one-off Tukey query convinces a meeting once. A data metric function (DMF) makes the same rule a named check that anyone can re-run and that keeps running. Snowflake ships system DMFs in SNOWFLAKE.CORE. Snowflake maintains them, and you cannot rename them or change what they do. You can attach several to one table or view.

    System DMFs come in two kinds, and they behave differently. Statistics DMFs such as MEDIAN, STDDEV or APPROX_QUANTILE_95 return a measurement, not a pass or fail. You decide which value counts as a problem. Outliers DMFs apply a built-in threshold and return how many values fall outside it, or what percentage. Most count and percentage DMFs measure bad values, so lower is better. A few, such as NOT_NULL_COUNT, count values that meet an expectation.

    System DMFs that put a quality or outlier rule into words
    System DMFWhat it measures
    OUTLIER_IQR_COUNTNon-NULL numeric values outside the standard Tukey fences (1.5 times the IQR)
    EXTREME_OUTLIER_IQR_COUNTValues outside the extreme Tukey fences (3 times the IQR)
    OUTLIER_ZSCORE_COUNTValues with a Z-score greater than 3
    NULL_COUNTHow many NULL values are in a column
    DUPLICATE_COUNTDuplicate values in a column, including NULL values
    MEDIANThe exact median of a numeric column

    You attach a DMF to a table with ALTER TABLE ... ADD DATA METRIC FUNCTION. With more than one column, DUPLICATE_COUNT counts rows whose combination of values repeats. Passing several columns works only when the DMF is attached to a table this way, not when you call it directly.

    Attach DUPLICATE_COUNT to a table on a column combinationsql
    ALTER TABLE t
      ADD DATA METRIC FUNCTION SNOWFLAKE.CORE.DUPLICATE_COUNT
        ON (first_name, last_name);

    The table's DATA_METRIC_SCHEDULE parameter sets when the checks run. The default is every hour, and every DMF on the table shares one schedule. You can set an interval in minutes, a cron expression, or a trigger that fires on DML changes to the table. A daily 8 AM run gives the business case an outlier count that is fresh each morning:

    Run the table's DMFs every day at 08:00 UTCsql
    ALTER TABLE hr.tables.empl_info SET DATA_METRIC_SCHEDULE = 'USING CRON 0 8 * * * UTC';

    Checkpoint 6 of 6· Check yourself

    A data engineer attaches SNOWFLAKE.CORE.STDDEV to order_amount and schedules it daily, hoping to be told whenever unusual orders show up. What does each scheduled run actually give them?

    Sources789

    Sources

    (9)

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

    1. 1.
      “Select columns, cells, rows, or ranges in the results table to view relevant information about the selected data in the inspector pane”
      ↩︎ Reading the results-grid statistics as evidence
      “The histogram indicates the rows that fall into a particular range.”
      ↩︎ Reading the results-grid statistics as evidence
      “For up to 1 million rows of results, you can review generated statistics”
      ↩︎ Reading the results-grid statistics as evidence
      “Categorical columns are text columns where the same values are used more than once.”
      ↩︎ Reading the results-grid statistics as evidence
    2. 2.
      “Each query supports one type of chart at a time.”
      ↩︎ Reading the results-grid statistics as evidence
      “Charts let you quickly identify and understand patterns and outliers in data.”
      ↩︎ Choosing a worksheet chart for the business question
      “Charts can bucket by date, week, month, and year for date columns.”
      ↩︎ Choosing a worksheet chart for the business question
      “Chart generation and data transformations in worksheets can result in compute usage.”
      ↩︎ Choosing a worksheet chart for the business question
      “If a column name changes, you must update the chart to use the new column name.”
      ↩︎ Choosing a worksheet chart for the business question
      “Each query supports one type of chart at a time.”
      ↩︎ Exam trap 1
      “Without modifying your query, you can easily select a different bucket of time (e.g. weekly or monthly data) in the inspector panel”
      ↩︎ Checkpoint
    3. 3.
      “If no input row lies exactly at the desired percentile, the result is calculated using linear interpolation of the two nearest input values.”
      ↩︎ Spread, percentiles and Tukey fences in SQL
    4. 5.
      “The estimation uses a constant amount of space regardless of the size of the input.”
      ↩︎ Spread, percentiles and Tukey fences in SQL
    5. 6.
      “The size of the data set and the skew in the data set affect the accuracy of the approximation.”
      ↩︎ Spread, percentiles and Tukey fences in SQL
      “This function uses an improved version of the t-Digest algorithm.”
      ↩︎ Exam trap 2
      “Note that the value returned in this case is higher than any value actually in the data set”
      ↩︎ Prediction
    6. 7.
      “System DMFs are maintained by Snowflake; you cannot change the name or functionality of any system DMF.”
      ↩︎ Naming the outlier rule with system data metric functions
      “The Statistics DMFs return a measurement rather than a pass or fail signal.”
      ↩︎ Naming the outlier rule with system data metric functions
      “The Outliers DMFs apply a built-in threshold, such as Tukey fences or a Z-score cutoff”
      ↩︎ Key concept
      “Determine how many non-NULL values in a numeric column fall outside the standard Tukey fences (1.5 times the interquartile range).”
      ↩︎ Exam trap 3
      “The Statistics DMFs return a measurement rather than a pass or fail signal.”
      ↩︎ Exam trap 4
      “The Statistics DMFs return a measurement rather than a pass or fail signal. You define the expectation”
      ↩︎ Checkpoint
    7. 8.
      “Returns the count of column values that have duplicates, including NULL values.”
      ↩︎ Naming the outlier rule with system data metric functions
    8. 9.
      “By default, the schedule is set to one hour. All data metric functions on a table or view follow the same schedule.”
      ↩︎ Naming the outlier rule with system data metric functions

    Continue to part 2 of 2

    Charting and presenting with Snowflake Notebooks

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