CREATE TABLE table_train_144 ("id" NUMBER, "retinal_dystrophy" BOOLEAN, "mini_mental_state_examination_mmse" NUMBER, "memory_box" FLOAT, "body_weight" FLOAT, "neutrophil_count" NUMBER, "moca_score" NUMBER, "severe_dementia" BOOLEAN, "dementia" BOOLEAN, "macular_degeneration" BOOLEAN, "diabetic_retinopathy" BOOLEAN, "retinal_disease" BOOLEAN, "moderate_dementia" BOOLEAN, "glaucoma" BOOLEAN, "optic_nerve_disease" BOOLEAN, "platelet_cell_count" NUMBER, "body_mass_index_bmi" FLOAT, "clinical_dementia_rating_cdr" FLOAT, "NOUSE" FLOAT)

subjects with dementia must have moderate / severe dementia as preferentially defined by a documented moca score of less than 17 , or by mmse score of less than 17, within the last 12 months
SELECT * FROM table_train_144 WHERE dementia = 1 AND (moderate_dementia = 1 OR severe_dementia = 1) OR (moca_score < 17 OR mini_mental_state_examination_mmse < 17)
SELECT * FROM "table_train_144" WHERE ("dementia" = 1 OR "mini_mental_state_examination_mmse" < 17 OR "moca_score" < 17) AND ("mini_mental_state_examination_mmse" < 17 OR "moca_score" < 17 OR "moderate_dementia" = 1 OR "severe_dementia" = 1)