Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Query
    • Overview
    • Selecting data from all columns
    • Selecting data from specific columns
    • Sorting and filtering
    • Aggregating data
    • Additional selection criteria
    • Working with JSON
    • Running a streaming data query
  • Access management
  • Pricing policy
  • Integration
  • Audit Trails events
  • FAQ
  1. Working with YQL
  2. Selecting data from specific columns

Selecting data from specific columns

Written by
Yandex Cloud
Improved by
Updated at March 6, 2025

You can fetch data from all columns as well as from their their subsets. You can also rename existing columns and create new ones.

For example:

  • Select data from the age, last_visit_time, and region columns.
  • Rename region to area.
  • Change the release_date column type from Int32 to DateTime.
SELECT
    VendorID,                           -- List column names (VendorID, trip_distance)
    trip_distance,                      -- separated by commas.
    fare_amount AS fare,                -- You can use AS to rename columns
    (total_amount/1000) AS total_amount_thousand_dollars, -- or give a name to any expression.
    CAST(VendorID as Uint32) AS vendorID -- You can change data type using CAST.
FROM
    `tutorial-analytics`
LIMIT 10

View the example in the right-hand section and click Run.
Query results are available in the Result tab as a table or schema.

See also

  • SELECT operator
  • YQL data types
  • Type casting in YQL
  • Functions for dates

Was the article helpful?

Previous
Selecting data from all columns
Next
Sorting and filtering
Yandex project
© 2025 Yandex.Cloud LLC