## queries.SelectQuery


Query class for SELECT operations.


Usage

``` python
queries.SelectQuery(
    table,
    columns=None,
)
```


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Initialize a new SELECT query. |
| [order_by()](#order_by) | Add an ORDER BY clause to the query. |
| [to_dataframe()](#to_dataframe) | Convert the query results to a pandas DataFrame. |
| [to_pandas()](#to_pandas) | Convert the query results to a pandas DataFrame. |

------------------------------------------------------------------------


#### \_\_init\_\_()


Initialize a new SELECT query.


Usage

``` python
__init__(table, columns=None)
```


##### Parameters


`table: BaseTable`  
The table to select from

`columns: str or list of str = None`  
The column or columns to select


------------------------------------------------------------------------


#### order_by()


Add an ORDER BY clause to the query.


Usage

``` python
order_by(column, descending=False)
```


##### Parameters


`column: str`  
Column name in any casing

`descending: bool = ``False`  
Whether to sort in descending order


##### Returns


`self`  
For method chaining


##### Raises


`ValueError`  
If no column matches `column`.


------------------------------------------------------------------------


#### to_dataframe()


Convert the query results to a pandas DataFrame.


Usage

``` python
to_dataframe()
```


##### Returns


`pandas.DataFrame`  
A pandas DataFrame containing the query results


------------------------------------------------------------------------


#### to_pandas()


Convert the query results to a pandas DataFrame.


Usage

``` python
to_pandas()
```


##### Returns


`pandas.DataFrame`  
A pandas DataFrame containing the query results
