Selecting specific columns
You can select all or only specific columns. You can also rename existing columns and create new ones.
For example:
- Select columns
age,last_visit_time, andregion. - Rename
regiontoarea. - Change
release_datedata type fromInt32toDateTime.
SELECT
VendorID, -- Column names
trip_distance, -- separated by commas.
fare_amount AS fare, -- You can use AS to rename columns.
(total_amount/1000) AS total_amount_thousand_dollars, -- You can use AS to name any expression.
CAST(VendorID as Uint32) AS vendorID -- You can convert data types using CAST.
FROM
`tutorial-analytics`
LIMIT 10
Check the example in the right-hand section and click
The query result will appear in the Result tab as a table or chart.