I have a new google sheet set up to query my database via a connected sheet.
The query returns a list of our shops and their sales per year. Each shop has an ID.
I am able to set Cell A1 in another, reference sheet, to be a parameter in the query. This way the connected query only returns results for that particular store ID.
When using this, I really want to put an IN
function into my query. The connected query would then look something like.
SELECT * FROM shops where shops.id in (@RANGE)
And @RANGE would be A2:A as an array.
I've had success naming each cell as a new parameter and then:
SELECT * FROM shops where shops.id in (@REFERENCE1, @REFERENCE2)
Is there a more elegant solution?