Non continuous time graph

I’m using Grafana 4.3 and backend MySQL DB. Here is my SQL query return for particular Device:

And here are results:

Why it is displaying back in time?

Oh, got it, maybe it is not sorting time automatically

It is just an sql query. Here is the template you get when you create a new query and you can see it has an order by:

  UNIX_TIMESTAMP(<time_column>) as time_sec,
  <value column> as value,
  <series name column> as metric
FROM <table name>
WHERE $__timeFilter(time_column)
ORDER BY <time_column> ASC