google-big-queryHow do I query Google BigQuery using XML?
XML is not a supported query language for Google BigQuery. Instead, you should use the BigQuery Standard SQL syntax.
For example, the following query retrieves the total number of user sessions for each user:
SELECT user_id, COUNT(*) AS total_sessions
FROM `project.dataset.sessions_table`
GROUP BY user_id
The output of this query would be a table with two columns: user_id
and total_sessions
:
+---------+---------------+
| user_id | total_sessions|
+---------+---------------+
| 1234 | 10 |
| 5678 | 15 |
| 9012 | 20 |
+---------+---------------+
The query consists of three parts:
- The
SELECT
clause which defines the columns to be returned in the results. - The
FROM
clause which defines the table from which the data should be retrieved. - The
GROUP BY
clause which defines the column by which the data should be grouped.
For more information, see the Google BigQuery Documentation.
More of Google Big Query
- ¿Cuáles son las ventajas y desventajas de usar Google BigQuery?
- How can I use Google Big Query with MicroStrategy?
- How do I use an IF statement in Google BigQuery?
- How do I use the YEAR function in Google BigQuery?
- How can I use Google Big Query to analyze Reddit data?
- How can I learn to use Google Big Query?
- How can I use Google Big Query to count the number of zeros in a given dataset?
- How can I use Google Big Query to process XML data?
- How do I use Google Big Query to zip files?
See more codes...