Generate Data Insights on the order item table

Check my progress

/ 30

Use Table Explorer to review details of the location table

Check my progress

/ 30

Query the order item table without code

Check my progress

/ 40

This lab may incorporate AI tools to support your learning.
This content is not yet optimized for mobile devices.
For the best experience, please visit us on a desktop computer using a link sent by email.

GSP1257

Google Cloud self-paced labs

Overview

Imagine you're a detective trying to solve a mystery, but instead of clues, you have multiple massive spreadsheets of data.

You are a new data analyst for Data Beans, a company specializing in data collection, analytics, and insights for mobile coffee truck companies throughout your country. It is your first week at the company, and you are tasked with exploring the company's data related to the coffee trucks, menu, and orders. Your onboarding buddy recommends that you use BigQuery with the Reference panel and data insights features to learn about the data and gain insights from it without having to write SQL queries from scratch.

What you'll learn

In this lab, you learn how to perform the following tasks:

  • Generate data insights on the order_item table.
  • Use the Reference panel with the location table to generate basic queries.
  • Query the order_item table without writing SQL code.

After you complete these tasks, you also review the menu and order tables using either of these features as an open activity.

Finally, you reflect on what you have learned in this lab and consider how to apply the Reference panel and data insights features to your own use cases by answering questions in your Lab Journal.

Setup and requirements

Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.

This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.

To complete this lab, you need:

  • Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
  • Time to complete the lab—remember, once you start, you cannot pause a lab.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.

How to start your lab and sign in to the Google Cloud console

  1. Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the right is the Lab setup and access panel with the following:

    • The Open Google Cloud console button
    • The temporary credentials (username and password) that you must use for this lab
    • Other information, if needed, to step through this lab

    Note that the lab timer is located near the top of the page, showing the remaining time.

  2. Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).

    The lab spins up resources, and then opens another tab that shows the Sign in page.

    Tip: Arrange the tabs in separate windows, side-by-side.

    Note: If you see the Choose an account dialog, click Use Another Account.
  3. If necessary, copy the Username below and paste it into the Sign in dialog.

    {{{user_0.username | "Username"}}}

    You can also find the Username in the Lab setup and access panel.

  4. Click Next.

  5. Copy the Password below and paste it into the Welcome dialog.

    {{{user_0.password | "Password"}}}

    You can also find the Password in the Lab setup and access panel.

  6. Click Next.

    Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
  7. Click through the subsequent pages:

    • Accept the terms and conditions.
    • Do not add recovery options or two-factor authentication (because this is a temporary account).
    • Do not sign up for free trials.

After a few moments, the Google Cloud console opens in this tab.

Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field. Navigation menu icon and Search field

Task 1. Generate data insights on the order item table

In this task, you enable data insights on the order_item table within the coffee_on_wheels dataset.

Data insights is a tool for anyone who wants to explore their data and gain insights without writing complex SQL queries.

  1. In the Google Cloud console, on the Navigation menu, click BigQuery > Studio.

  2. Click Done on the welcome dialog.

  3. In the Data Explorer pane, expand the project to locate the coffee_on_wheels dataset.

  4. Expand the coffee_on_wheels dataset to view the order_item table.

  5. Click the order_item table to display and review the details of the order_item schema.

  6. Click the Insights tab.

    A message states "Insights have not yet been generated." This is expected because the insights have not yet been generated in your lab environment.

  7. Click Generate insights.

  8. Scroll through the dialog and click Generate to proceed.

  9. From the Region menu, select , and then click Generate.

    Gemini now generates insights for the order_item table.

    Note: It takes a few minutes to generate insights for the table. Wait until the insights are generated to check completion of this task. You return to insights for the order_item table later in the lab.

Click Check my progress to verify the objective. Generate data insights on the order item table.

Task 2. Use table explorer to review details of the location table

While you wait for the insights to be generated, use the Reference panel in BigQuery Studio to review the location table included with the coffee_on_wheels dataset. You also build a basic query with the Reference panel to find all fields associated with the Coffee Cart Connection, Empire Espresso Explorer, and Street Sips trucks.

Note: The Reference panel replaces the former Table explorer tab, which has been deprecated. If you have used Table explorer previously, schema browsing and click-to-build query construction now happen alongside the query editor instead of on a separate tab of the table details page.

Access the table explorer

  1. In the Data Explorer pane, click the location table to display and review the details of the location table schema, including the field names and data types.

  2. At the top of BigQuery Studio, click + (SQL query) to open an empty query editor tab.

  3. In the query editor, click Reference to open the Reference panel alongside the editor.

    Reference panel icon in the query editor toolbar

  4. In the Reference panel, use the search bar or browse the Recent section to find and click the location table.

    The Reference panel displays context-aware details for the table, including its fields and their data types, without leaving the query editor.

    Note: The Reference panel works with tables, views, materialized views, and table snapshots. You can preview schema details in the panel, or open a resource in a new tab for a fuller view.

Insert a query snippet and build a basic query

  1. In the Reference panel, next to the location table, click More actions (three vertical dots), and then click Insert query snippet.

    BigQuery inserts a starter SELECT statement for the location table into the query editor:

    SELECT * FROM `{{{project_0.project_id|set at lab start}}}.coffee_on_wheels.location`;
  2. Replace the * character with an explicit list of fields: select the * character in the editor, delete it, and then, with your cursor on that line, click each of the following field names in the Reference panel to insert them into the query (separating each field name with a comma):

    • city_id
    • company_id
    • location_id
    • location_name
    • location_type
    Note: Clicking a field name in the Reference panel inserts it at your cursor position in the query editor. This lets you build the SELECT list without typing field names or worrying about typos.
  3. Add a WHERE clause so that the query returns only the three trucks you are interested in:

    SELECT `city_id`, `company_id`, `location_id`, `location_name`, `location_type` FROM `{{{project_0.project_id|set at lab start}}}.coffee_on_wheels.location` WHERE (`location_name` IN ('Coffee Cart Connection', 'Empire Espresso Explorer', 'Street Sips')); Note: In the query editor toolbar, the query validator indicates that "This query will process 5.7 KB when run." This tells you how much data the query processes before you run it.
  4. Click Run.

    The result returns 3 rows with the city_id, company_id, location_id, location_name, and location_type of each of these trucks. You have built your first query with the Reference panel without writing the table reference or field names by hand.

In summary, the Reference panel is a tool for getting started with data exploration in BigQuery, especially if you are new to SQL or want a quick way to understand your data while you write a query.

Here are some key points to remember about the Reference panel:

  • It sits alongside the query editor, so you can browse a schema and write a query at the same time.
  • It is context-aware and shows recent and starred tables and views. You can also search for a resource by name.
  • It supports tables, views, materialized views, and table snapshots. You can preview schema details or open a resource in a new tab.
  • It speeds up query writing by inserting query snippets and field names directly into the editor, while you write clauses such as WHERE, GROUP BY, and joins.
  • Unlike the deprecated Table explorer, it is not limited to one table at a time and does not display distinct-value cards for each field. If you want to see the most common values in a field, run a query such as SELECT location_name, COUNT(*) FROM ... GROUP BY location_name ORDER BY 2 DESC.

Reflect on what you learned

  • Considering your data and use cases for BigQuery, how would you use the Reference panel feature?

Click Check my progress to verify the objective. Use table explorer to review details of the location table.

Task 3. Query the order item table without code

The insights you generated in Task 1 are now ready. In this task, you use a prompt generated from these insights to query the order_item table without writing SQL code.

Select an insight and run the query associated with it

  1. In the Data Explorer pane, click the order_item table and review the schema with the associated fields.

  2. Click Insights to view the generated insights.

    Note: Each insight is in the form of a question starting with who, what, when, where, or how, or with an action verb such as calculate, identify, or find.
  3. Review the list of insights, and search for an insight similar to the following question:

    What is the total revenue generated from each menu item? Note: This insight may be generated using phrasing such as "This query calculates the total revenue generated by each menu item." Note: Because insights are generated by Gemini based on the data in the dataset and the trained model, you might not see an insight identical to the preceding example. Search for a similar insight that calculates the total revenue for each menu item in the order_item table. Feel free to regenerate insights as needed by clicking Generate insights if you want to work with this example prompt.
  4. After you find a similar insight, expand the insight to reveal the underlying SQL code, which looks similar to the following query:

    SELECT menu_id, SUM(item_total) AS total_revenue FROM `coffee_on_wheels.order_item` GROUP BY menu_id;
  5. Click Copy to query.

    A new tab named Untitled query opens in BigQuery Studio with the question (the prompt that generated the query) and the SQL query included.

  6. Click Run.

    Notice that the results include two fields: menu_id and total_revenue for each menu item. However, the results are not sorted by revenue, and the total_revenue field includes extra decimal places. Next, you refine the query without writing SQL code.

Transform the query without code to include only two decimal places

  1. Select the query in the query editor.

  2. Next to the SELECT statement, click Gemini (Gemini icon), and then click Transform.

    A dialog opens with a text field and a Generate button where you can transform the query using natural language.

  3. Enter the following prompt:

    Display total_revenue rounded to 2 decimal points.
  4. Click Generate.

    The diff view displays the original query with red background text (marked with a minus sign) and the modified query with green background text (marked with a plus sign).

  5. Click Insert to insert the suggested query into the Untitled query tab:

    -- What is the total revenue generated by each menu item? -- Display total_revenue as 2 decimal points. SELECT menu_id, ROUND(SUM(item_total), 2) AS total_revenue FROM `{{{project_0.project_id|set at lab start}}}.coffee_on_wheels.order_item` GROUP BY 1;
  6. Click Run.

    Notice that the total_revenue field is now formatted with two decimal places.

Transform the query to order results in descending order

  1. Select the query in the query editor.

  2. Next to the SELECT statement, click Gemini (Gemini icon), and then click Transform.

  3. Enter the following prompt:

    Order the total_revenue field in descending order.
  4. Click Generate.

    The diff view displays the original query with red background text (marked with a minus sign) and the modified query with green background text (marked with a plus sign).

  5. Click Insert to insert the suggested query into the Untitled query tab:

    -- What is the total revenue generated from each menu item? -- Display total_revenue as 2 decimal points. -- Order the total_revenue field in descending order. SELECT menu_id, ROUND(SUM(item_total), 2) AS total_revenue FROM `{{{project_0.project_id|set at lab start}}}.coffee_on_wheels.order_item` GROUP BY menu_id ORDER BY total_revenue DESC;
  6. Click Run.

    Notice that the total_revenue field is now sorted in descending order, with the highest-revenue menu items displayed first.

Congratulations! You have used data insights to select an insight and transform it without writing SQL code.

In summary, BigQuery data insights is a tool for anyone who wants to explore their data and gain insights without writing complex SQL queries.

Here are some key points to remember about BigQuery data insights:

  • It is a helpful tool for exploring and understanding your data, especially if you are new to SQL or want to get started with data analysis.
  • It uses Gemini to generate queries based on your data's metadata, making it easier to find relevant insights.
  • It helps you quickly uncover patterns in your tables.

Reflect on what you learned

  1. Which insights did you find most useful with the order_item table?

  2. Considering your data and use cases for BigQuery, how would you use the data insights feature?

Click Check my progress to verify the objective. Query the order item table without code.

Task 4. Review the menu and order tables

In this task, you explore the remaining menu and order tables in the coffee_on_wheels dataset and answer the following questions using your Lab Journal. Use the data insights and Reference panel tools—or write your own queries—to answer these questions. Be mindful of the remaining time left for this lab: when 5 minutes remain, confirm that you have completed all progress checks to receive credit for completing the lab.

  1. Find the top three items with the highest average prices for each size.

    • Which table or tables contain this information?
    • Which tool helps you answer this question?
  2. Find all orders from location_id 37.

    • Which table or tables contain this information?
    • How many orders are there from this location?
    • Which tool would you use to find all the orders?
  3. For your use cases, which tool—the Reference panel or data insights—would help you the most, and why?

After you have answered the questions, review the Lab Journal Solutions.

Congratulations!

In this lab, you learned how to generate data insights and use those insights to query the coffee_on_wheels dataset without writing SQL code. You also learned how to use the Reference panel to explore the location table and build basic queries. Finally, you considered how to apply these features to your own data and use cases with BigQuery.

Next steps / Learn more

Consider sharing what you have learned in this lab and your journal responses with your team. To learn more, see the following resources:

Google Cloud training and certification

...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.

Manual Last Updated on November 06, 2026

Lab Last Tested on November 21, 2026

Copyright 2026 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

Before you begin

  1. Labs create a Google Cloud project and resources for a fixed time
  2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
  3. On the top left of your screen, click Start lab to begin

Use private browsing

  1. Copy the provided Username and Password for the lab
  2. Click Open console in private mode

Sign in to the Console

  1. Sign in using your lab credentials. Using other credentials might cause errors or incur charges.
  2. Accept the terms, and skip the recovery resource page
  3. Don't click End lab unless you've finished the lab or want to restart it, as it will clear your work and remove the project

This content is not currently available

We can notify you via email when it becomes available

Great!

We can contact you via email if it becomes available

One lab at a time

Confirm to end all existing labs and start this one

Use private browsing to run the lab

Using an Incognito or private browser window is the best way to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.