CREATE TABLE table_dev_4 ("id" INT, "hypothyroidism" BOOLEAN, "serum_bicarbonate" INT, "c_peptide_level" FLOAT, "autoimmune_disease" BOOLEAN, "hemoglobin_a1c_hba1c" FLOAT, "positive_serum" BOOLEAN, "inhaled_steroids" BOOLEAN, "diabetic_ketoacidosis" BOOLEAN, "creatinine_clearance_cl" FLOAT, "urinary_ketones" BOOLEAN, "admission_blood_glucose" INT, "chronic_inflammatory" BOOLEAN, "asthma" BOOLEAN, "NOUSE" FLOAT)

subjects must have an admission blood glucose > 140 mg and < 400 mg / dl without laboratory evidence of diabetic ketoacidosis ( serum bicarbonate < 18 meq / l or positive serum or urinary ketones ) .
SELECT * FROM table_dev_4 WHERE admission_blood_glucose > 140 AND admission_blood_glucose < 400 OR (diabetic_ketoacidosis = 0 OR serum_bicarbonate < 18 OR positive_serum = 1 OR urinary_ketones = 1)
SELECT * FROM "table_dev_4" WHERE ("admission_blood_glucose" < 400 OR "diabetic_ketoacidosis" = 0 OR "positive_serum" = 1 OR "serum_bicarbonate" < 18 OR "urinary_ketones" = 1) AND ("admission_blood_glucose" > 140 OR "diabetic_ketoacidosis" = 0 OR "positive_serum" = 1 OR "serum_bicarbonate" < 18 OR "urinary_ketones" = 1)