snowflake-sql

Optimize Snowflake SQL queries with QUALIFY, ILIKE, and LATERAL FLATTEN patterns.

475|25|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/SignalPilot-Labs/SignalPilot --skill snowflake-sql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: snowflake-sql
Source: https://github.com/SignalPilot-Labs/SignalPilot/tree/main/benchmark/signalpilot-plugin/skills/snowflake-sql
Command: npx skills add https://github.com/SignalPilot-Labs/SignalPilot --skill snowflake-sql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Snowflake SQL queries often require a set of patterns to achieve common analytics tasks, which can lead to verbose and error-prone code. This Skill provides concise, reusable patterns to streamline such queries and improve readability and reliability.

Core Features & Use Cases

  • QUALIFY-based window filtering to identify the latest record per group without subqueries.
  • ILIKE-based case-insensitive filtering for robust data selection.
  • LATERAL FLATTEN and VARIANT field access to handle semi-structured data in Snowflake.
  • Comprehensive guidance on date and string functions to simplify transformations.
  • Use Case: Build concise analytics queries that are easy to maintain across large Snowflake datasets.

Quick Start

Execute a QUALIFY-based query to return the latest order per customer from the orders table.

Frequently Asked Questions about snowflake-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use QUALIFY in Snowflake SQL to filter window functions without a subquery?

QUALIFY in Snowflake SQL filters window function results directly in the SELECT statement, eliminating the need for nested subqueries to identify the latest record per group. It provides concise, readable query patterns for analytics tasks.

What's the best way to query semi-structured VARIANT data in Snowflake?

Query semi-structured VARIANT data in Snowflake using LATERAL FLATTEN to expand arrays and objects, then access nested fields directly. This approach provides modular, best-practice snippets for handling complex data-analytics scenarios safely.

Does ILIKE work for case-insensitive matching in Snowflake SQL?

ILIKE works for case-insensitive pattern matching in Snowflake SQL, providing robust data selection without manual lower or upper case conversions. It simplifies filtering logic for string comparisons across large datasets.

How do I optimize Snowflake SQL query patterns for large analytics datasets?

Optimize Snowflake SQL query patterns by applying QUALIFY for window filtering, ILIKE for case-insensitive matching, and LATERAL FLATTEN for VARIANT data. These modular snippets ensure correct function usage and clear performance considerations.

When do I need LATERAL FLATTEN to handle JSON arrays in Snowflake?

LATERAL FLATTEN is needed when handling JSON arrays or nested objects in Snowflake to expand semi-structured VARIANT fields into relational rows. It enables direct field access for analytics transformations on complex data structures.