LoslegenKostenlos loslegen

Using joins

In many data warehouses, including BigQuery, data is stored in various tables linked by common keys across the table. This is the case with the course data, which mimics a real-world data warehouse.

For this exercise, you will combine two tables to create a single outcome.

Diese Übung ist Teil des Kurses

Introduction to BigQuery

Kurs anzeigen

Anleitung zur Übung

  • Join the ecomm_orders to the ecomm_order_details using the common order_id column.
  • Order the dataset by order_purchase_timestamp to show the most recent orders.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

SELECT
	ecomm_orders.order_id,
    ecomm_orders.order_items,
  	ecomm_order_details.order_status,
    ecomm_order_details.order_purchase_timestamp
FROM
	ecommerce.ecomm_orders
-- Join on the common order_id column
JOIN 
	ecommerce.ecomm_order_details ___ (___)
-- Order to show recent orders
ORDER BY ___ ___
LIMIT 10;
Code bearbeiten und ausführen