Histogram Plot of Machine Data

Hi
I am totally new to grafana and would like to display data of a MySQL Database that looks like this:

Timestamp | timestamp
Partname | text

As I do not have values but only events when and which part was produced I can not display a nice plot. So i found out that this is called bucketing when multiple events are connected in a specified time range (corrrect me if i’m wrong).

I setup a Histogram Plot and this is my Query (copied from here)

SELECT
  MIN(UNIX_TIMESTAMP(timestamp)) as time_sec,
  avg(Partname) as value
FROM roboter
WHERE $__timeFilter(timestamp)
GROUP BY date_format(timestamp, $interval)
ORDER BY date_format(timestamp, $interval) ASC

And I added the variable $interval:
select 'minute' AS __text, '%Y%m%d%H%i' as __value union select 'hour' AS __text, '%Y%m%d%H' as __value union select 'day' AS __text, '%Y%m%d' as __value union select 'month' AS __text, '%Y%m' as __value

Still no data is displayed. Can you help me setup my first plot?

Thanks in advance!