Please see my solution below, I'm sure I could amalgamate this into a more elegant solution.
Step 1 involved creating a view of the distance for every school to every childminder
CREATE OR REPLACE VIEW education.vw_childminder_distance AS
SELECT all_schools."Dfes", all_schools."UPRN", all_schools."NAME", childminders.title, childminders.ofsted_urn, st_distance(all_schools.wkb_geometry, childminders.wkb_geometry)::integer AS distance
FROM education.all_schools, education.childminders
ORDER BY all_schools."NAME", st_distance(all_schools.wkb_geometry, childminders.wkb_geometry)::integer;
Second step I partitioned the original view and created a new view of the nearest five chilminders to every school. Apologies for not presenting the SQL in a readable fashion.
CREATE OR REPLACE VIEW education.vw_nearest_childminders_to_school AS
SELECT sc."NAME" AS school_name, sc."UPRN" AS school_uprn, sc."Dfes" AS school_dfes, max(
CASE
WHEN sc.school_name = 1 THEN sc.title
ELSE NULL::character varying
END::text) AS childminder_1, max(
CASE
WHEN sc.school_name = 1 THEN sc.ofsted_urn
ELSE NULL::character varying
END::text) AS childminder_1_urn, max(
CASE
WHEN sc.school_name = 1 THEN sc.distance
ELSE NULL::integer
END) AS childminder_1_distance, max(
CASE
WHEN sc.school_name = 2 THEN sc.title
ELSE NULL::character varying
END::text) AS childminder_2, max(
CASE
WHEN sc.school_name = 2 THEN sc.ofsted_urn
ELSE NULL::character varying
END::text) AS childminder_2_urn, max(
CASE
WHEN sc.school_name = 2 THEN sc.distance
ELSE NULL::integer
END) AS childminder_2_distance, max(
CASE
WHEN sc.school_name = 3 THEN sc.title
ELSE NULL::character varying
END::text) AS childminder_3, max(
CASE
WHEN sc.school_name = 3 THEN sc.ofsted_urn
ELSE NULL::character varying
END::text) AS childminder_3_urn, max(
CASE
WHEN sc.school_name = 3 THEN sc.distance
ELSE NULL::integer
END) AS childminder_3_distance, max(
CASE
WHEN sc.school_name = 4 THEN sc.title
ELSE NULL::character varying
END::text) AS childminder_4, max(
CASE
WHEN sc.school_name = 4 THEN sc.ofsted_urn
ELSE NULL::character varying
END::text) AS childminder_4_urn, max(
CASE
WHEN sc.school_name = 4 THEN sc.distance
ELSE NULL::integer
END) AS childminder_4_distance, max(
CASE
WHEN sc.school_name = 5 THEN sc.title
ELSE NULL::character varying
END::text) AS childminder_5, max(
CASE
WHEN sc.school_name = 5 THEN sc.ofsted_urn
ELSE NULL::character varying
END::text) AS childminder_5_urn, max(
CASE
WHEN sc.school_name = 5 THEN sc.distance
ELSE NULL::integer
END) AS childminder_5_distance
FROM ( SELECT sc."Dfes", sc."UPRN", sc."NAME", sc.title, sc.ofsted_urn, sc.distance, row_number() OVER (PARTITION BY sc."NAME" ORDER BY sc.distance) AS school_name
FROM education.vw_childminder_distance sc) sc
GROUP BY sc."NAME", sc."UPRN", sc."Dfes";