1. 1. Introduction
  2. 2. Queries
    1. 2.1. Pipelines
    2. 2.2. Functions
    3. 2.3. Tables
  3. 3. Transforms
    1. 3.1. Aggregate
    2. 3.2. Append
    3. 3.3. Derive
    4. 3.4. Filter
    5. 3.5. From
    6. 3.6. Group
    7. 3.7. Join
    8. 3.8. Select
    9. 3.9. Sort
    10. 3.10. Take
    11. 3.11. Window
  4. 4. Syntax
  5. 5. Language features
    1. 5.1. Coalesce
    2. 5.2. Dates & times
    3. 5.3. Distinct
    4. 5.4. Null handling
    5. 5.5. Ranges
    6. 5.6. Regex
    7. 5.7. Stdlib
    8. 5.8. Strings
    9. 5.9. S-Strings
    10. 5.10. F-Strings
    11. 5.11. Switch
    12. 5.12. Target & Version
  6. 6. Bindings
    1. 6.1. Elixir
    2. 6.2. Java
    3. 6.3. JavaScript
    4. 6.4. Python
    5. 6.5. R
    6. 6.6. Rust
  7. 7. Integrations
    1. 7.1. dbt
    2. 7.2. Jupyter
    3. 7.3. Prefect
    4. 7.4. VSCode
    5. 7.5. Rill
  8. 8. Examples
    1. 8.1. Variables
    2. 8.2. List equivalence
    3. 8.3. CTE (intermediate tables)
    4. 8.4. Employees
  9. 9. Contributing to PRQL
    1. 9.1. Development
    2. 9.2. Using Docker
  10. 10. Internals
    1. 10.1. Compiler architecture
    2. 10.2. Name resolving
    3. 10.3. Functions
    4. 10.4. Syntax highlighting

PRQL Language Book

Language features

The pages of this section describe how PRQL handles various aspects of the language.

FeaturePurpose
CoalesceHandle potentially NULL values
Dates & timesHandle dates and times
DistinctEquivalent of SQL DISTINCT
Null handlingHandle NULL values
RangesSyntax for all forms of ranges
RegexHandle regular expressions
StdlibPRQL’s “builtin” set of functions
StringsRules for creating strings
S-StringsInsert SQL directly into a query with an S-string
F-StringsCombine several column’s data with F-strings
SwitchCreate a new column based on the contents of other columns
Target & VersionSpecify a target SQL engine and PRQL version