Join not working on Time series graph

There are two table, qr_manager_qrcode and qr_manager_qrcategory. The columns of the qr_manager_qrcode table are

  • id
  • category_id
  • created

and the columns of qr_manager_qrcategory are

  • id
  • name

I want to render a time-series graph of the count of qr_manager_qrcode records group by the qr_manager_qrcategory and display with the usage count for the selected time range of qr_manager_qrcode.created

Here is the SQL query working fine in the MySQL workbench

  qr_manager_qrcode.created AS "time", AS "name",
  count(*) as 'usage'
FROM qr_manager_qrcode
inner join qr_manager_qrcategory on = qr_manager_qrcode.category_id
GROUP BY qr_manager_qrcode.category_id
ORDER BY qr_manager_qrcode.created

But in Grafana, it is giving an error

Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'inner join qr_manager_qrcategory on = qr_manager_qrcode' at line 8