 LEFT JOIN
   (SELECT
     *
-  FROM ebmdatalab.hscic.bnf, (
+  FROM hscic.bnf, (
     SELECT
       'Glucose Blood Testing Reagents' AS presentation,
       'Glucose Blood Testing Reagents' AS chemical,

            AVG({{ cost_field }}/quantity) AS price_per_unit
          FROM
            {{ prescribing_table }} AS p
          LEFT JOIN ebmdatalab.hscic.practices practices
            ON p.practice = practices.code
          WHERE
            practices.setting = 4 AND

          quantity
        FROM
          {{ prescribing_table }} AS p
        LEFT JOIN hscic.tariff t
          ON p.bnf_code = t.bnf_code
        LEFT JOIN hscic.practices practices
          ON p.practice = practices.code
        WHERE
          practices.setting = 4 AND
