# Rubicon SQL

This page describes the SQL language supported by Rubicon. It is based on PostgresSQL with a few modifications to support streaming use cases.&#x20;

### Data Types

Rubicon does not require the user to explicitly define the data types for the source tables or the output of a transformation. All data types are implicitly inferred from the transformation and the destination where the output is being materialized.

### Operations

<mark style="color:blue;">**SELECT CLAUSE**</mark>

**Syntax**

```sql
SELECT select_list FROM table_expression [ WHERE boolean_expression ]
```

\
**Example**

```sql
SELECT order_id, price + tax FROM Orders
```

[<mark style="color:blue;">**WITH CLAUSE**</mark>](#user-content-fn-1)[^1]

**Syntax**

```sql
WITH <with_item_definition<> [, ... ]
SELECT... FROM ....;

<with_item_definition>:
    with_item_name (column_name[, ...n]) AS ( <select_query> )
```

\
**Example**

```sql
WITH orders_with_total AS (
    SELECT order_id, price + tax AS total
    FROM Orders
)
SELECT order_id, SUM(total)
FROM orders_with_total
GROUP BY order_id;
```

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rubicon.io/transformations/rubicon-sql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
