saving common sql queries as I create them
working functions for frequency comparison and chunk subsetting by PAC