parse "meta:key" frequency definitions and generate SQL