bigquery-sql
BigQuery-specific SQL patterns: UNNEST for array expansion, STRUCT, ARRAY_AGG, DATE_DIFF/DATE_ADD, backtick-quoted table…
Snowflake-specific SQL patterns: QUALIFY for window filtering, LATERAL FLATTEN for arrays, semi-structured VARIANT data, ILIKE for case-insensitive matching, date functions, and time travel.
Claude Code
$ npx -y skills add signalpilot-labs/signalpilot --skill snowflake-sql --agent claude-code
Codex
$ npx skills add signalpilot-labs/signalpilot --skill snowflake-sql -a codex -y
Cursor
$ npx skills add signalpilot-labs/signalpilot --skill snowflake-sql -a cursor -y
Gemini CLI
$ npx skills add signalpilot-labs/signalpilot --skill snowflake-sql -a gemini-cli -y
GitHub Copilot
$ npx skills add signalpilot-labs/signalpilot --skill snowflake-sql -a github-copilot -y
OpenCode
$ npx skills add signalpilot-labs/signalpilot --skill snowflake-sql -a opencode -y
Windsurf
$ npx skills add signalpilot-labs/signalpilot --skill snowflake-sql -a windsurf -y
name: snowflake-sql description: "Snowflake-specific SQL patterns: QUALIFY for window filtering, LATERAL FLATTEN for arrays, semi-structured VARIANT data, ILIKE for case-insensitive matching, date functions, and time travel." type: skill
Instead of wrapping in a subquery, use QUALIFY:
-- Find the latest record per customer SELECT customer_id, order_date, amount FROM orders QUALIFY ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date DESC) = 1; -- Top 5 products by sales SELECT product_id, total_sales FROM sales_summary QUALIFY DENSE_RANK() OVER (ORDER BY total_sales DESC) <= 5;
-- Case-insensitive LIKE WHERE product_name ILIKE '%widget%' -- Case-insensitive equality WHERE UPPER(status) = 'ACTIVE' -- or WHERE status ILIKE 'active'
-- Explode an ARRAY column SELECT t.id, f.value AS item FROM table t, LATERAL FLATTEN(input => t.array_col) f; -- Access VARIANT fields SELECT col:field_name::STRING AS field_value FROM table; -- Parse JSON string SELECT PARSE_JSON(json_col):key::STRING AS val FROM table;
-- Add/subtract time
DATEADD(day, 7, order_date) -- 7 days from order_date
DATEADD(month, -1, current_date()) -- 1 month ago
-- Difference between dates
DATEDIFF(day, start_date, end_date) -- days between dates
DATEDIFF(month, start_date, end_date)
-- Truncate to period
DATE_TRUNC('month', event_ts)
DATE_TRUNC('year', event_ts)
-- Current timestamp
CURRENT_TIMESTAMP()
CURRENT_DATE()SPLIT_PART(col, '/', 1) -- split by delimiter, get Nth part REGEXP_SUBSTR(col, '[0-9]+') -- first match of regex TRIM(col) -- remove leading/trailing whitespace LTRIM(col, '0') -- remove leading zeros UPPER(col) / LOWER(col) CONCAT(col1, '-', col2) -- or col1 || '-' || col2
-- NULL-safe: TRUE when both are NULL or both equal col1 IS NOT DISTINCT FROM col2 -- COALESCE for default values COALESCE(col, 'unknown')
-- Query table as it was 1 hour ago SELECT * FROM my_table AT (OFFSET => -3600); -- Query at a specific timestamp SELECT * FROM my_table AT (TIMESTAMP => '2024-01-01'::TIMESTAMP);
BigQuery-specific SQL patterns: UNNEST for array expansion, STRUCT, ARRAY_AGG, DATE_DIFF/DATE_ADD, backtick-quoted table…
Load when dbt run or dbt parse fails. Covers YML duplicate patches, ref errors, passthrough model warnings, current_date fixes,…
Populate the knowledge base from dbt project research. Proposes entries across all 6 categories at org, project, and connection…
Load when task involves dbt snapshots, SCD Type 2, or tracking data changes over time. Covers strategy selection, column casing,…
Load when task involves adding, writing, or fixing dbt unit tests. Covers unit_tests YAML format, given/expect blocks, edge-case…
Load when task involves dbt model versioning, creating v2 of a model, or backward-compatible model changes. Covers versions YAML…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…