Refactor _get_presentations_by_practice
Refactor _get_presentations_by_practice

This fixes a bug in the SQL construction.  Specifically, if there are
multiple orgs and a date, then the constructed SQL looks like:

  WHERE ... AND (pct_id = %s OR pct_id = %s AND processing_date = %s)

when it should look like:

  WHERE ... AND (pct_id = %s OR pct_id = %s) AND processing_date = %s

ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing