Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE table_train_124 ( "id" int, "loss_of_consciousness" bool, "serum_glucose" bool, "myelosuppression" bool, "retinoids_hepatotoxic" bool, "pulmonary_disease" bool, "etiology" bool, "abnormal_thyroid_function" bool, "laboratory_abnormality" bool, "chest_pain" bool, "dsm_iv_criteria" bool, "neurodegenerative_disease" bool, "active_infection" bool, "epilepsy" bool, "major_psychiatric_disorder" bool, "investigational_new_drug" bool, "head_injury" bool, "stroke" bool, "substance_dependence" bool, "anterograde_amnesia" bool, "renal_disease" bool, "cerebrovascular_disease" bool, "hepatic_disease" bool, "other_systemic_disease" bool, "psychiatric_disease" bool, "clinical_disorder" bool, "multiple_sclerosis" bool, "retinoids" bool, "cardiovascular_disease" bool, "hematologic_disease" bool, "prothrombin_time" bool, "focal_brain_lesion" bool, "ventricular_fibrillation" bool, "psychosis" bool, "liver_disease" bool, "bipolar_disorder" bool, "chronic_inflammatory" bool, "brain_lesions" bool, "diabetes" bool, "vitamin_b12_deficiency" bool, "medical_disorder" bool, "total_bilirubin" bool, "gastrointestinal_disease" bool, "endocrine_disease" bool, "metabolic" bool, "ventricular_tachycardia" bool, "neurological_disease" bool, "seizure_disorder" bool, "ast_or_alt" bool, "alcohol_abuse" bool, "ad" bool, "neurosurgery" bool, "allergy_to_retinoids" bool, "brain_radiation" bool, "major_depression" bool, "NOUSE" float )

### Question ###
patients with vitamin b12 deficiency, abnormal thyroid function, or personal history of either any clinically defined medical disorder or any clinically defined neurological / psychiatric disorder ( other than ad ) , including ( but not limited to ) :, stroke, brain lesions, , cerebrovascular condition, other neurodegenerative disease, significant head trauma ( loss of consciousness greater than half an hour, or related anterograde amnesia ) , multiple sclerosis; or personal history of previous neurosurgery or brain radiation

### Accurate SQL ###

SELECT * FROM table_train_124 WHERE vitamin_b12_deficiency = 1 OR abnormal_thyroid_function = 1 OR medical_disorder = 1 OR neurological_disease = 1 OR psychiatric_disease = 1 AND ad = 0 OR (stroke = 1 OR brain_lesions = 1 OR cerebrovascular_disease = 1 OR neurodegenerative_disease = 1 OR (head_injury = 1 OR loss_of_consciousness = 1 OR anterograde_amnesia = 1) OR multiple_sclerosis = 1 OR neurosurgery = 1 OR brain_radiation = 1)