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_144 ( "id" int, "retinal_dystrophy" bool, "mini_mental_state_examination_mmse" int, "memory_box" float, "body_weight" float, "neutrophil_count" int, "moca_score" int, "severe_dementia" bool, "dementia" bool, "macular_degeneration" bool, "diabetic_retinopathy" bool, "retinal_disease" bool, "moderate_dementia" bool, "glaucoma" bool, "optic_nerve_disease" bool, "platelet_cell_count" int, "body_mass_index_bmi" float, "clinical_dementia_rating_cdr" float, "NOUSE" float )

### Question ###
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

### Accurate SQL ###

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)