Is there any way i can apply one value on two different table

Consider below query:

Select name from table_a join table_b on a.name = b.name where table_a.date between {{date_range}}
and table_b.date between {{date_range}}

Note: i have one date_range filter in dashboard and want to provide the selected values in above query.

Can i use the same date_range variable for two table?

What can be the best approach for this ?

Hi @mitesh.b
Not without having a lookup table, which contains all dates and then using sub-selects to get min/max from that sub-select to apply to the tables.
You would have to use two simple Date filters with start and end.
https://www.metabase.com/learn/building-analytics/sql-templates/sql-variables.html