Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
78fb5be2
Commit
78fb5be2
authored
Dec 18, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: mysql example with macro
parent
40af84a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
docs/sources/features/datasources/mysql.md
+13
-0
No files found.
docs/sources/features/datasources/mysql.md
View file @
78fb5be2
...
...
@@ -106,6 +106,19 @@ GROUP BY metric1, UNIX_TIMESTAMP(time_date_time) DIV 300
ORDER
BY
time_sec
asc
```
Example with $__timeGroup macro:
```
sql
SELECT
$
__timeGroup
(
time_date_time
,
'5m'
)
as
time_sec
,
min
(
value_double
)
as
value
,
metric_name
as
metric
FROM
test_data
WHERE
$
__timeFilter
(
time_date_time
)
GROUP
BY
1
,
metric_name
ORDER
BY
1
```
Currently, there is no support for a dynamic group by time based on time range & panel width.
This is something we plan to add.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment