def METHOD_NAME():
    session = make_session()
    session.add_all(
        [
            # This patient is too old and should be ignored
            Patient(
                DateOfBirth="2002-05-04",
                Vaccinations=[
                    Vaccination(
                        VaccinationName="Infanrix Hexa",
                        VaccinationDate="2002-06-01",
                    )
                ],
            ),
            # This patient is too young and should be ignored
            Patient(
                DateOfBirth="2019-10-04",
                Vaccinations=[
                    Vaccination(
                        VaccinationName="Infanrix Hexa",
                        VaccinationDate="2019-11-04",
                    )
                ],
            ),
            Patient(
                DateOfBirth="2018-10-28",
                Vaccinations=[
                    Vaccination(
                        VaccinationName="Infanrix Hexa",
                        VaccinationDate="2018-11-01",
                    )
                ],
                MedicationIssues=[
                    MedicationIssue(
                        MedicationDictionary=MedicationDictionary(
                            DMD_ID="123", MultilexDrug_ID="123"
                        ),
                        ConsultationDate="2019-01-01",
                    ),
                ],
                CodedEvents=[CodedEvent(CTV3Code="abc", ConsultationDate="2019-06-01")],
            ),
        ]
    )
    session.commit()
    sql = vaccination_events_sql(
        date_of_birth_range=("2012-01-01", "2019-06-01"),
        tpp_vaccination_codelist=codelist(
            [("Infanrix Hexa", "dtap_hex")],
            system="tpp_vaccines",
        ),
        ctv3_codelist=codelist([("abc", "menb")], system="ctv3"),
        snomed_codelist=codelist([("123", "rotavirus")], system="snomed"),
    )
    results = sql_to_dicts(sql)
    result_tuples = [(x["date_given"], x["vaccine_name"]) for x in results]
    # Results are ordered by patient ID but within each patient's results the
    # order is arbitrary. To make testing easier we sort them here.
    result_tuples = sorted(result_tuples)
    assert result_tuples == [
        ("2018-11-01", "dtap_hex"),
        ("2019-01-01", "rotavirus"),
        ("2019-06-01", "menb"),
    ]