0001 ---
0002 layout: global
0003 title: Data Retrieval
0004 displayTitle: Data Retrieval
0005 license: |
0006 Licensed to the Apache Software Foundation (ASF) under one or more
0007 contributor license agreements. See the NOTICE file distributed with
0008 this work for additional information regarding copyright ownership.
0009 The ASF licenses this file to You under the Apache License, Version 2.0
0010 (the "License"); you may not use this file except in compliance with
0011 the License. You may obtain a copy of the License at
0012
0013 http://www.apache.org/licenses/LICENSE-2.0
0014
0015 Unless required by applicable law or agreed to in writing, software
0016 distributed under the License is distributed on an "AS IS" BASIS,
0017 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0018 See the License for the specific language governing permissions and
0019 limitations under the License.
0020 ---
0021
0022 Spark supports <code>SELECT</code> statement that is used to retrieve rows
0023 from one or more tables according to the specified clauses. The full syntax
0024 and brief description of supported clauses are explained in
0025 [SELECT](sql-ref-syntax-qry-select.html) section. The SQL statements related
0026 to SELECT are also included in this section. Spark also provides the
0027 ability to generate logical and physical plan for a given query using
0028 [EXPLAIN](sql-ref-syntax-qry-explain.html) statement.
0029
0030 * [SELECT Statement](sql-ref-syntax-qry-select.html)
0031 * [WHERE Clause](sql-ref-syntax-qry-select-where.html)
0032 * [GROUP BY Clause](sql-ref-syntax-qry-select-groupby.html)
0033 * [HAVING Clause](sql-ref-syntax-qry-select-having.html)
0034 * [ORDER BY Clause](sql-ref-syntax-qry-select-orderby.html)
0035 * [SORT BY Clause](sql-ref-syntax-qry-select-sortby.html)
0036 * [CLUSTER BY Clause](sql-ref-syntax-qry-select-clusterby.html)
0037 * [DISTRIBUTE BY Clause](sql-ref-syntax-qry-select-distribute-by.html)
0038 * [LIMIT Clause](sql-ref-syntax-qry-select-limit.html)
0039 * [Common Table Expression](sql-ref-syntax-qry-select-cte.html)
0040 * [Hints](sql-ref-syntax-qry-select-hints.html)
0041 * [Inline Table](sql-ref-syntax-qry-select-inline-table.html)
0042 * [JOIN](sql-ref-syntax-qry-select-join.html)
0043 * [LIKE Predicate](sql-ref-syntax-qry-select-like.html)
0044 * [Set Operators](sql-ref-syntax-qry-select-setops.html)
0045 * [TABLESAMPLE](sql-ref-syntax-qry-select-sampling.html)
0046 * [Table-valued Function](sql-ref-syntax-qry-select-tvf.html)
0047 * [Window Function](sql-ref-syntax-qry-select-window.html)
0048 * [EXPLAIN Statement](sql-ref-syntax-qry-explain.html)