Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Data Types | Introduction to BigQuery-Specific Features
Practice
Projects
Quizzes & Challenges
Visat
Challenges
/
BigQuery Fundamentals

bookChallenge: Data Types

Pyyhkäise näyttääksesi valikon

  1. Write a query that calculates the total revenue per store using the data in the retail_data_updated table: Multiply the quantity (INTEGER) and unit_price (FLOAT) to calculate revenue per transaction.
    • Group the results by store_id;
    • Sum the revenue for each store;
    • Your query should return these columns:
      • store_id (identifier for each store);
      • total_revenue (sum of quantity × unit_price per store).
  2. Write a query that counts how many transactions happened each year and month using the date field in the retail_data_updated table:
    • Extract the year and month from the date field;
    • Group by year and month;
    • Count the number of transactions in each time period;
    • Your query should return these columns:
      • year_month (formatted as YYYY-MM);
      • transaction_count (number of transactions per month).
  3. Write a query that compares the number of online vs in-store transactions in the retail_data_updated table:
    • Group the data by the is_online column (BOOLEAN);
    • Count how many transactions occurred for each value (TRUE = online, FALSE = in-store);
    • Your query should return these columns:
      • is_online (TRUE or FALSE);
      • transaction_count (number of transactions for each group).
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 2

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Osio 3. Luku 2
some-alt