Issue in mysql custom query


i made a time series graph screenshot attached and the generated query is

SELECT
  UNIX_TIMESTAMP(date_of_sign_up) DIV 600 * 600 AS "time",
  status AS "borrower_status",
  count(id) AS "Number Of Borrowers"
FROM borrowers
WHERE
  date_of_sign_up BETWEEN FROM_UNIXTIME(1631158800) AND FROM_UNIXTIME(1643881661) AND
  status IN ('APPROVED','INACTIVE','BASIC') AND
  client_id = 1304545
GROUP BY 1, status
ORDER BY UNIX_TIMESTAMP(date_of_sign_up) DIV 600 * 600

Now i want to pass from and to from url in mysql query builder

SELECT
  $__timeGroupAlias(date_of_sign_up,10m),
  status AS "borrower_status",
  count(id) AS "Number Of Borrowers"
FROM borrowers
WHERE
 date_of_signup between $from AND $to  AND
  status IN (${BorrowerStatus}) AND
  client_id = [[tenant]]
GROUP BY 1, status
ORDER BY $__timeGroup(date_of_sign_up,10m)

What is the correct way of passing from and to from url params in mysql query builder date_of_signup between

I would explore the macros that are available in Grafana for manipulating time inside MySQL:

I would also explore examples on our public sandbox to get a sense of how others write Grafana queries for SQL-style DBs

https://play.grafana.org

This issue is resolved for me.
Please look into this issue