The SELECT operation allows projecting a set of columns from the underlying table. The
API can be used for selecting the desired fields.
It is also possible to select distinct rows while projecting the table columns. The
API can be used for selecting distinct values.
SQL Frames is architected for efficient usage of memory with appropriate sharing of data between DataFrames. Hence, the projection operation, while it creates a new DataFrame is a very light operation both computationally and memory wise.
Some clauses of the SELECT statement result in the creation of a separate DataFrame while the other do not. For example ORDER BY doesn't create a separate DataFrame by default. If the effect of ordering data is limited to a specific query, then the DataFrame can be first filtered and then ordered and the ordering is limited only to the Filtered DataFrame. See ORDER BY for further details.
It is possible to use the special notation of
* to select all the fields without explicitly specifying them.
This is useful when the selection includes all the fields and also additional calculations.
* can be anywhere in the projected list of fields and not necessarily in the beginning.