How to: Raw SQL Editor
Raw Editor allows custom SQL queries to be written:

![raw editor image](https://github.com/Altinity/clickhouse-grafana/raw/master/.github/images/06_raw_sql_editor.png)

Raw Editor allows typing queries, get info about functions and macros, format queries as Clickhouse do.
To Execute query on server press "Run Query" or just leave focus from SQL editor textarea.

Under the Editor you can find options which allows setup rounding, time column step 
and `Add metadata` to SQL query which allows know which dashboard and user produce workload to your ClickHouse server.

Press `Show Generated SQL` for see a raw query (all macros and functions have already been replaced) which will be sent directly to ClickHouse.
![generated sql](https://github.com/Altinity/clickhouse-grafana/raw/master/.github/images/07_generated_sql.png)