SELECT
run_id as “Run ID”,
min(timestamp_sec) as “Test started”,
(max(timestamp_millis)-min(timestamp_millis))/1000 as “Duration”,
max(startedThreads) as “Started threads”,
concat(‘Dashboard’) as “Link”
from jmresults_statistic
GROUP BY run_id,profile_name
ORDER BY run_id DESC
LIMIT 50
The last part is I’m unsure if whether the group, sort, and limit function should be applied for each subsequent variable/query. I included it at the top to limit your response to make the query faster, but I’m not confident it’ll yield the same results. It depends on the shape of your data. However, I hope this acts as a good starting point for you.