I have a following sample table:
| Info | County | State |
|---|---|---|
| info1 | Sonoma | California |
| info2 | Fresno | California |
| info3 | Lake | California |
| info5 | Lake | Florida |
I need to select say, Sonoma county from California and Lake county from Florida. I need to pass the needed counties and the needed states as list parameters so that they could be given as arguments to a script.
SELECT
ST_UNION_AGG(Info) as counties_info
FROM
`project.dataset.table`
WHERE
County IN UNNEST(@counties) AND
State IN UNNEST(@states)
This query will also give me the Lake county in California, how do I modify the script while still using the needed list parameters [@counties and @states]?
NOTE: I cannot check for individual states as the @states parameters can have any state in it.

