Influx - get all unique timestamps to filter for one

i have an influxdb measurement like this:

time field1 field2
2022-05-10T10:15:16.789Z 12 22
2022-05-10T10:15:16.789Z 12 12
2022-05-11T10:15:16.789Z 14 22
2022-05-11T10:15:16.789Z 14 25
2022-05-12T10:15:16.789Z 12 22
2022-05-12T10:15:16.789Z 13 21

I would like to show these values in a grafana table and want to show the fields filtered by time.
So i need to create avariable that has unique timestamps.

Can you help me with this query? Or is this not possible?

In the table-view i will then create a query like select * from measurement where time=$selected_time

it sounds like you want to create a query-based template variable:

Here are the docs on template variables. And here is a list of good examples on that use template variables. You can inspect each dashboard to see just how the variables are constructed.