# 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]:
