List all instances filtered by job inside variable

Hi all

Im starting to use grafana and inside prometheus I configured multiple jobs to separate targets, but I need to show In a variable all instances of this job and there is no form to show ony instances from a job. Which function I need to use? Usually how example appears label_values, but In my case If I put

label_values(job=“myjob”,instance) appears with error. How can I list all instances?

Thanks

Id use plain SQL: SELECT * AS $LABEL_INSTANCE FROM <TABLE_NAME>.
Bear in mind that this is how I would do this. This does not reflect your infrastructure / use-case