How to Create a Table in BigQuery

Last updated July 26, 2026 · By the SaturnSQL team

CREATE TABLE defines columns; add PARTITION BY on a DATE column so time-filtered queries scan less data. BigQuery bills by bytes scanned, so this directly cuts cost.

CREATE TABLE analytics.events
(
  event_id STRING,
  event_time TIMESTAMP,
  event_date DATE,
  user_id INT64,
  event_type STRING
)
PARTITION BY event_date;

Why partitioning matters for cost

BigQuery charges per byte scanned, not per query. Without a partition column, a query for last week's events still scans every row ever inserted. With PARTITION BY event_date and a filter like WHERE event_date >= '2026-07-19', it only reads that week's partitions.

Clustering for extra pruning

CLUSTER BY sorts data within each partition by the given columns, which helps queries that filter or aggregate on high-cardinality fields like user_id.

CREATE TABLE analytics.events
(
  event_id STRING,
  event_time TIMESTAMP,
  event_date DATE,
  user_id INT64,
  event_type STRING
)
PARTITION BY event_date
CLUSTER BY user_id;

Run this in SaturnSQL

SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.

Try it free

Related BigQuery guides