Browse Source

Demo -> Example

Andrew Kane 9 năm trước cách đây
mục cha
commit
7af082005d
1 tập tin đã thay đổi với 16 bổ sung17 xóa
  1. 16 17
      README.md

+ 16 - 17
README.md

@@ -135,15 +135,17 @@ Create queries with variables.
 SELECT * FROM users WHERE gender = {gender}
 ```
 
-Use `{start_time}` and `{end_time}` for time ranges.
+Use `{start_time}` and `{end_time}` for time ranges. [Example](http://blazer.hero2app.com/queries/8-ratings-by-time-range?start_time=1997-10-03T04%3A00%3A00%2B00%3A00&end_time=1997-10-05T03%3A59%3A59%2B00%3A00)
 
 ```sql
-SELECT * FROM users WHERE created_at >= {start_time} AND created_at <= {end_time}
+SELECT * FROM ratings WHERE rated_at >= {start_time} AND rated_at <= {end_time}
 ```
 
 ### Smart Variables
 
-Supposed you have the query:
+[Example](http://blazer.hero2app.com/queries/9-movies-by-genre)
+
+Suppose you have the query:
 
 ```sql
 SELECT * FROM users WHERE city_id = {city_id}
@@ -162,6 +164,8 @@ The first column is the value of the variable, and the second column is the labe
 
 ### Linked Columns
 
+[Example](http://blazer.hero2app.com/queries/4-highest-rated-movies) - 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}`.
 
 ```yml
@@ -172,6 +176,10 @@ linked_columns:
 
 ### Smart Columns
 
+[Example](http://blazer.hero2app.com/queries/11-users) - occupation_id column
+
+Suppose you have the query:
+
 ```sql
 SELECT name, city_id FROM users
 ```
@@ -191,37 +199,30 @@ 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)
+2+ columns - timestamp, numeric(s) - [Example](http://blazer.hero2app.com/queries/1-new-ratings-per-week)
 
 ```sql
 SELECT date_trunc('week', created_at), COUNT(*) FROM users GROUP BY 1
 ```
 
-[Demo](http://blazer.hero2app.com/queries/1-new-ratings-per-week)
+3 columns - timestamp, string, numeric - [Example](http://blazer.hero2app.com/queries/7-new-ratings-by-gender-per-month)
 
-3 columns - timestamp, string, numeric
 
 ```sql
 SELECT date_trunc('week', created_at), gender, COUNT(*) FROM users GROUP BY 1, 2
 ```
 
-[Demo](http://blazer.hero2app.com/queries/7-new-ratings-by-gender-per-month)
-
 ### Pie Chart
 
-2 columns - string, numeric
+2 columns - string, numeric - [Example](http://blazer.hero2app.com/queries/2-top-genres)
 
 ```sql
 SELECT gender, COUNT(*) FROM users GROUP BY 1
 ```
 
-[Demo](http://blazer.hero2app.com/queries/2-top-genres)
-
 ## Dashboards
 
-Combine multiple queries into a dashboard.
-
-[Demo](http://blazer.hero2app.com/dashboards/1-movielens)
+Create a dashboard with multiple queries. [Example](http://blazer.hero2app.com/dashboards/1-movielens)
 
 If the query has a chart, the chart is shown. Otherwise, you’ll see a table.
 
@@ -229,9 +230,7 @@ If any queries have variables, they will show up on the dashboard.
 
 ## Checks
 
-Checks give you a centralized place to see the health of your data.
-
-[Demo](http://blazer.hero2app.com/checks)
+Checks give you a centralized place to see the health of your data. [Example](http://blazer.hero2app.com/checks)
 
 Create a query to identify bad rows.