# View Builder

The View Builder is a graphical interactive view editor that allows to build a complex view based on multiple tables with complex join models in a simple way. It allows to enhance projected fields by renaming them and using type converions.

As a result builder produces the SQL script like

    CREATE VIEW views.NewView AS
    SELECT
        ...
    FROM
        ...

that is opened in an SQL editor

## FAQ

### How do I create a self join?

A self join is a join where the left and right tables are the same physical table. In order to identity the left and right sources, they must have unique aliases. Duplicating a table or adding it once again will generate a new source that references same physical table, but with a new unique alias.

So, to create a self-join:

1. Add the desired table using the "Add table"
   Table
   button.
2. Duplicate the table using the "Duplicate table"
   Table
   button or add the same table like in step one once again.
3. Select both tables and define a join using the "Add join"
   Join
   button.

Please refer to an SQL Join reference for more details.