I'm wondering whether we actually need a query per sequence. Couldn't we just use the same query and parameterize it with the sequence name to retrieve a value for?