bigquery-sql

Provide BigQuery SQL patterns for nested and partitioned data.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BigQuery SQL often requires patterns to handle nested fields, array data, and partitioned or wildcard tables efficiently. This Skill provides a catalog of proven SQL patterns to simplify complex queries and improve performance.

Core Features & Use Cases

  • UNNEST for array expansion and offset-aware enumeration
  • Use STRUCT and ARRAY_AGG to shape and aggregate results
  • Date functions for time-based calculations (DATE_ADD, DATE_DIFF, DATE_TRUNC)
  • Backtick-quoted table references and handling of partitioned and wildcard tables
  • Practical use cases: transforming nested data, querying partitioned tables, and generating analytics-ready outputs

Quick Start

Analyze a nested table dataset.table to count events per day using UNNEST and ARRAY_AGG.

Frequently Asked Questions about bigquery-sql

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

FAQPage Schema
How do I expand arrays in BigQuery using UNNEST?

To expand arrays in BigQuery, use the UNNEST function to flatten nested fields into relational rows. This allows you to query individual array elements and perform offset-aware enumeration for detailed event analysis.

What is the best way to aggregate nested records into arrays in BigQuery SQL?

The best way to aggregate nested records in BigQuery SQL is using ARRAY_AGG combined with STRUCT. This approach reshapes flattened relational data back into nested arrays and structs for analytics-ready outputs.

How do I calculate time differences in BigQuery partitioned tables?

To calculate time differences in BigQuery, apply DATE_DIFF and DATE_ADD within your partitioned table queries. Using DATE_TRUNC helps normalize partition boundaries for efficient time-based analytics.

Can I query multiple tables at once using wildcard tables in BigQuery?

Yes, you can query multiple tables at once using wildcard table references in BigQuery. This scans across tables matching a wildcard pattern, simplifying queries over date-sharded or similarly structured datasets.

Do I need backticks for table references in BigQuery SQL?

Yes, backticks are required for table references in BigQuery SQL when names contain reserved words or special characters. Backtick-quoted references ensure proper parsing when querying partitioned and wildcard tables.