StateHistoryQuery: tune type queries