Dependent variable in Grafana using Postgresql datasource

Hello everyone , I am using Grafana v9.0.4 on windows system .I am using a Postgresql datasource .
I want to create a dependent variable. Such that the value of variable1 can be used in the where condition of the query for variable2.
I am trying to achieve this using query in the variable .
After writing the query I do not see any values below.
I expect to see values below which I can select
I have seen this examples working for InfluxDB is it possible for postgresql, if yes what is the syntax. I cannot use custom in variable as the as the dataset is huge and changes on selection of different value in varaible1.
Can I please get help to create this second variable which is dependent on the first variable

Please provide the query you used for variable.

Also try running that same query in pgadmin and see if it produces any results

Hi @yosiasz
Mr, Sean Bradley who is a instructor for Grafna course on udemy helped me get the answer.
so my first variable had the values which was list of different countries.

variable1 :
name = country
query = select country_name from country

variable2
name = city
query = select city from country where country_name in ($country)