Prepares and returns a SELECT query object.
$table: The base table for this query, that is, the first table in the FROM clause. This table will also be used as the "base" table for query_alter hook implementations.
$alias: The alias of the base table of this query.
$options: An array of options on the query.
\Drupal\Core\Database\Query\SelectInterface An appropriate SelectQuery object for this database connection. Note that it may be a driver-specific subclass of SelectQuery, depending on the driver.
Drupal\Core\Database\Query\Select
public function select($table, $alias = NULL, array $options = array()) {
$class = $this
->getDriverClass('Select');
return new $class($table, $alias, $this, $options);
}