CREATE TABLE table_train_144 ("id" INT, "retinal_dystrophy" BOOLEAN, "mini_mental_state_examination_mmse" INT, "memory_box" FLOAT, "body_weight" FLOAT, "neutrophil_count" INT, "moca_score" INT, "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" INT, "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)