How to associate search box 2 with search box 1

After creating an SQL query, insert two search boxes into the dashboard. How to associate search box 2 with search box 1? This means that the options in search box 1 will affect search box 2, and the content associated with search box 2 will also be automatically displayed

This should cover it: