From clause
A FROM clause is the SQL query component that specifies the tables or other data sources providing input rows.
DuckDB in Action
The FROM clause specifies the relations that provide the input data for a SQL query.
- How it is used
- Defines query input sources before filtering, grouping, joining, or projecting results.
- How deep it goes
- Explains tables, inline values, subqueries, CTEs, joins, and recursive sources, but defers full SELECT reference details.
- Examples
- Demonstrates prices, VALUES relations, grouped readings, file joins, subqueries, CTEs, and recursive parent-child paths.
- What you can do after
- Apply it to read tables, filter inputs, combine relations, and build larger analytical queries.
Learn SQL in a Month of Lunches
A FROM clause is the SQL clause that specifies the table or other data source from which data is retrieved or related data is selected.
- How it is used
- Identifies the data set that supplies rows for retrieval queries and multi-table joins.
- How deep it goes
- Defines FROM, demonstrates a one-table query, and notes clause order, joins, variables, and DELETE portability.
- Examples
- Uses a vegetables table, customer-order date filtering, title-sales thresholds, and deletion by TitleID.
- What you can do after
- Apply it to name a query's source table, join related tables, and retain portable DELETE syntax.
Read how Learn SQL in a Month of Lunches explains from clause →
Grokking Relational Database Design
A FROM clause specifies the table or tables that provide the source rows for an SQL query.
- How it is used
- Uses FROM to identify the source rows for queries that retrieve and filter data.
- How deep it goes
- Defines FROM and demonstrates it in a SELECT-WHERE query, without exploring query execution internals.
- Examples
- Demonstrates FROM product in a query that returns names of products priced above 20.
- What you can do after
- Apply it via SQL by selecting source rows from a named table and combining FROM with SELECT and WHERE.
Read how Grokking Relational Database Design explains from clause →
Related concepts
- SQLpart of · SQL is a standardized declarative language for defining, querying, and manipulating data and structures in relational database systems.
- datasetuses · A dataset is an organized collection of related data items, records, or observations treated as a unit for storage, processing, analysis, or computation.
- selectcontrasts with · SELECT is a SQL query construct that specifies the rows, columns, or expressions retrieved from one or more queryable data sources.
- keywordkind of · A keyword is a language-defined word or token with a predefined syntactic or semantic role, often restricted from use as an ordinary identifier.
- join conditionhas part · A join condition is a Boolean predicate specifying how rows from joined tables correspond to one another.
- nested queryhas part · A nested query is a query embedded within another query or statement whose result participates in evaluating the containing operation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


