BigQuery, SQL, Starting Out

Getting Started: Google BigQuery

If you read Getting Started: SQL, did some tutorials, and now you’re wondering “Great, that sounds fantastic, but how the fuck do I even open BigQuery?” - this is for you.

BigQuery is Google’s cloud-based data warehouse. It lets you run real SQL (say it with me here… Sequel…) on real datasets without downloading anything or setting up a local database. But getting started isn’t exactly straightforward, so this guide walks you through how to actually get it working - so you can stop clicking around in circles and start writing real queries.


Step 1: Add Billing (Yes, It’s Free. No, You Can’t Skip It.)

BigQuery has a generous free tier, and that’s what we’re using here. You won’t get charged unless you go wild - like trying to join every table together. Honestly, I’ve run a lot of queries and haven’t even gotten close to the limit, so don’t stress.

Later in this guide, you’ll also learn how to check your usage and set up budget alerts and limits, just in case (and if you’re not already excited about the premise of setting up alerts and limits, don’t worry - as you get deeper into the data and analytics world, you’ll learn to love them).

Still, Google makes you attach a billing account before you can do anything. No way around it.

Here’s how to set it up:

  1. Go to console.cloud.google.com/billing
  2. Click “Create account”
  3. Name your billing account something reusable - like Anna's Personal BigQuery Billing
  4. Choose your country and click “Continue”
  5. Enter your payment info
  6. Click “Submit”
  7. Once it’s created, go back and link it to your project (unless you don’t have one yet, then we’ll create that next in Step 2)

And remember, you’re not getting charged unless you really try.


Step 2: Create a Google Cloud Project

Before you can start using BigQuery, you need to create a Google Cloud Project. This is basically your workspace - it holds your queries, datasets, billing, and settings. You’ll be working inside this project every time you use BigQuery.

One thing to know up front: you can’t rename a project once it’s created. You can change the display name, but the project ID is permanent and something you’ll have written in your queries - so maybe don’t call it test-garbage-v3-final-final. Pick something you won’t hate in three weeks.

Here’s how to create your project:

  1. Go to console.cloud.google.com
  2. In the top nav, click the project dropdown next to the Google Cloud logo
  3. Click “New Project” on the top right of the pop up box
  4. Name it something like sql-practice or bigquery-demo
  5. Under “Billing account,” make sure the billing profile you just set up is selected
    • If you don’t see it, click “Manage billing accounts” and link it manually
  6. Click “Create”
  7. Wait a few seconds for it to spin up, then switch into that project if it doesn’t do it automatically

Once that’s done, you’re finally ready to open BigQuery.


Step 3: Open BigQuery

Finally. You’ve set up billing. You’ve created a project. Now it’s time to actually open BigQuery - the place where you’ll run all your SQL.

Here’s how to get into it:

  1. Go to console.cloud.google.com/bigquery
  2. Make sure your project is selected in the top nav
  3. You should land in the BigQuery UI - if you feel like you’re not in the right spot, search for “BigQuery” in the top search bar and hit enter. If you’re still on the same page and confused, just keep reading to learn more about how the hell to even understand this interface

If this is your first time opening it, Google might pop up with a “Welcome to BigQuery” screen. Just click through it. You do not need to set up any datasets or upload anything right now.

If you don’t see your project in the left sidebar yet, don’t panic - it sometimes takes a minute to load. You’re good as long as the editor opens and your project shows up in the top nav.


WTF Am I Looking At?

The BigQuery interface is… a lot. Here’s a quick breakdown so you don’t immediately close the tab.

  • Left Sidebar: This is where your project(s) and datasets live. Once you’ve pinned any public datasets, they’ll show up here too.
  • Top Nav: Shows your current project. Make sure it’s the one you just created - otherwise your queries won’t save in the right place.
  • Main Editor (center): This is where you’ll actually write your SQL. The tab maybe says “Query Editor,” or you may need to click “Create New SQL Query”
  • Bottom Panel: This is where your query results show up after you run something. If it’s empty, it’s because you haven’t done anything yet. That’s fine.

You don’t need to click anything else right now. Don’t go touching “Explore” or “Create Table” unless you want to take a detour into even more chaos. We’ll get to that stuff in a later article.


Step 4: Explore Public Datasets

Now that BigQuery’s open, let’s load up some real data.

BigQuery comes with a bunch of public datasets - NYC taxi rides, Baseball stats, SF Film Locations, and a ton more. You can query them directly without downloading anything, and they’re perfect for practicing.

Here’s how to find them:

  1. In the BigQuery sidebar, click “+ Add Data”
  2. Select “Explore Public Datasets”
  3. This opens the Analytics Hub - scroll, browse, or search for something that doesn’t bore you
    • A few solid picks based on the above suggestions:
      • bigquery-public-data.new_york.tlc_yellow_trips_2018
      • bigquery-public-data.baseball.schedules
      • bigquery-public-data.san_francisco.film_locations
  4. Click into a dataset you like, then hit “Pin” so it shows up in your sidebar

You don’t need to understand the naming convention, aka schema yet - just find a table with a name that looks interesting and pin it. You’ll write your first query against it in the next step.


Step 5: Write Your First Query

You’ve got BigQuery open. You’ve got a dataset pinned. Time to actually write some SQL.

Here’s how to run a super basic query so you can make sure everything’s working:

  1. In the sidebar, click into a dataset you pinned
  2. Find a table (like tlc_yellow_trips_2018)
  3. Hover over it, click the three dots, and select “Query” > “In New Tab”

This drops you into the editor with a template that looks like this:

SELECT *
FROM `bigquery-public-data.new_york.tlc_yellow_trips_2018`
LIMIT 1000

That LIMIT 1000 part is your new best friend. Always use a limit when you’re just testing stuff - otherwise you might accidentally scan hundreds of gigabytes and cry.

Now hit Run at the top of the editor.

If you see rows appear at the bottom, congrats - you just ran your first real query.

If it errors out, double check that your billing is linked, you’re in the right project, and your dataset is public.


Reading Your Results

Once your query runs, scroll down to the bottom panel — that’s where the results live.

Here’s what you’re looking at:

  • Results tab: This is your actual data — a table of rows and columns that match what you asked for. If you ran SELECT *, it’s going to show you everything in that table (or at least the first 1,000 rows if you followed the suggestion to use LIMIT).
  • Scanned data: In the top right corner of the results panel, you’ll see how much data your query scanned. This is what counts against your 1 TB free tier. For simple queries with a limit, it’ll usually be just a few MB - you’re good.
  • Execution time: Mostly for curiosity, but you’ll see how long your query took to run. It’ll almost always be fast unless you’re doing something ridiculous.

If it says “Query complete. Zero rows returned,” don’t panic. Your query ran fine - it just didn’t match anything.

Once you’ve got a result, give yourself a high-five, a pat on the back, and settle in — because this is where it starts to get fun.

Here’s how to keep going:

  1. Head back to the Google BigQuery Public Dataset Marketplace
  2. Click on the “Samples” tab to find bite-sized, clean datasets that are easy to play with
  3. Pick a question that looks interesting, try to answer it yourself, then run the code linked in the example to see how your result compares

If your answer doesn’t match theirs, don’t panic, but don’t copy it either. Try again without looking at the provided solution. Once you get it right, go compare the logic. Figure out what you did differently and what you can learn from their version. That’s where the real progress happens.

You’ve got the setup. You’ve got the tools. Now go run some queries and start getting curious.