|
@@ -148,13 +148,13 @@ before_action: require_admin
|
|
|
|
|
|
### Variables
|
|
|
|
|
|
-Create queries with variables.
|
|
|
+Create queries with variables. [Example]()
|
|
|
|
|
|
```sql
|
|
|
SELECT * FROM users WHERE gender = {gender}
|
|
|
```
|
|
|
|
|
|
-Use `{start_time}` and `{end_time}` for time ranges. [Example](https://blazerme.herokuapp.com/queries/8-ratings-by-time-range?start_time=1997-10-03T05%3A00%3A00%2B00%3A00&end_time=1997-10-04T04%3A59%3A59%2B00%3A00)
|
|
|
+Use `{start_time}` and `{end_time}` for time ranges. [Example](https://blazerme.herokuapp.com/queries/9-time-range-selector?start_time=1997-10-03T05%3A00%3A00%2B00%3A00&end_time=1997-10-04T04%3A59%3A59%2B00%3A00)
|
|
|
|
|
|
```sql
|
|
|
SELECT * FROM ratings WHERE rated_at >= {start_time} AND rated_at <= {end_time}
|
|
@@ -162,7 +162,7 @@ SELECT * FROM ratings WHERE rated_at >= {start_time} AND rated_at <= {end_time}
|
|
|
|
|
|
### Smart Variables
|
|
|
|
|
|
-[Example](https://blazerme.herokuapp.com/queries/3-users-by-occupation)
|
|
|
+[Example](https://blazerme.herokuapp.com/queries/1-smart-variable)
|
|
|
|
|
|
Suppose you have the query:
|
|
|
|
|
@@ -183,7 +183,7 @@ The first column is the value of the variable, and the second column is the labe
|
|
|
|
|
|
### Linked Columns
|
|
|
|
|
|
-[Example](https://blazerme.herokuapp.com/queries/4-highest-rated-movies) - title column
|
|
|
+[Example](https://blazerme.herokuapp.com/queries/3-linked-column) - title column
|
|
|
|
|
|
Link results to other pages in your apps or around the web. Specify a column name and where it should link to. You can use the value of the result with `{value}`.
|
|
|
|
|
@@ -195,7 +195,7 @@ linked_columns:
|
|
|
|
|
|
### Smart Columns
|
|
|
|
|
|
-[Example](https://blazerme.herokuapp.com/queries/10-users) - occupation_id column
|
|
|
+[Example](https://blazerme.herokuapp.com/queries/2-smart-column) - occupation_id column
|
|
|
|
|
|
Suppose you have the query:
|
|
|
|
|
@@ -239,13 +239,13 @@ Blazer will automatically generate charts based on the types of the columns retu
|
|
|
|
|
|
There are two ways to generate line charts.
|
|
|
|
|
|
-2+ columns - timestamp, numeric(s) - [Example](https://blazerme.herokuapp.com/queries/1-new-ratings-per-week)
|
|
|
+2+ columns - timestamp, numeric(s) - [Example](https://blazerme.herokuapp.com/queries/6-bar-chart-format-1)
|
|
|
|
|
|
```sql
|
|
|
SELECT date_trunc('week', created_at), COUNT(*) FROM users GROUP BY 1
|
|
|
```
|
|
|
|
|
|
-3 columns - timestamp, string, numeric - [Example](https://blazerme.herokuapp.com/queries/7-new-ratings-by-gender-per-month)
|
|
|
+3 columns - timestamp, string, numeric - [Example](https://blazerme.herokuapp.com/queries/7-bar-chart-format-2)
|
|
|
|
|
|
|
|
|
```sql
|
|
@@ -256,13 +256,13 @@ SELECT date_trunc('week', created_at), gender, COUNT(*) FROM users GROUP BY 1, 2
|
|
|
|
|
|
There are also two ways to generate column charts.
|
|
|
|
|
|
-2+ columns - string, numeric(s) - [Example](https://blazerme.herokuapp.com/queries/2-top-genres)
|
|
|
+2+ columns - string, numeric(s) - [Example](https://blazerme.herokuapp.com/queries/6-column-chart-format-1)
|
|
|
|
|
|
```sql
|
|
|
SELECT gender, COUNT(*) FROM users GROUP BY 1
|
|
|
```
|
|
|
|
|
|
-3 columns - string, string, numeric
|
|
|
+3 columns - string, string, numeric - [Example](https://blazerme.herokuapp.com/queries/7-column-chart-format-2)
|
|
|
|
|
|
```sql
|
|
|
SELECT gender, zip_code, COUNT(*) FROM users GROUP BY 1, 2
|
|
@@ -270,7 +270,7 @@ SELECT gender, zip_code, COUNT(*) FROM users GROUP BY 1, 2
|
|
|
|
|
|
### Maps
|
|
|
|
|
|
-Columns named `latitude` and `longitude` or `lat` and `lon` - [Example](https://blazerme.herokuapp.com/queries/11-airports-in-pacific-time-zone)
|
|
|
+Columns named `latitude` and `longitude` or `lat` and `lon` - [Example](https://blazerme.herokuapp.com/queries/15-map)
|
|
|
|
|
|
```sql
|
|
|
SELECT name, latitude, longitude FROM cities
|
|
@@ -280,7 +280,7 @@ To enable, get an access token from [Mapbox](https://www.mapbox.com/) and set `E
|
|
|
|
|
|
### Targets
|
|
|
|
|
|
-Use the column name `target` to draw a line for goals.
|
|
|
+Use the column name `target` to draw a line for goals. [Example](https://blazerme.herokuapp.com/queries/8-target-line)
|
|
|
|
|
|
```sql
|
|
|
SELECT date_trunc('week', created_at), COUNT(*) AS new_users, 100000 AS target FROM users GROUP BY 1
|
|
@@ -288,7 +288,7 @@ SELECT date_trunc('week', created_at), COUNT(*) AS new_users, 100000 AS target F
|
|
|
|
|
|
## Dashboards
|
|
|
|
|
|
-Create a dashboard with multiple queries. [Example](https://blazerme.herokuapp.com/dashboards/1-movielens)
|
|
|
+Create a dashboard with multiple queries. [Example](https://blazerme.herokuapp.com/dashboards/1-dashboard-demo)
|
|
|
|
|
|
If the query has a chart, the chart is shown. Otherwise, you’ll see a table.
|
|
|
|