CREATE TABLE table_test_31 ("id" INT, "ejection_fraction_ef" INT, "macular_disease" BOOLEAN, "systemic" BOOLEAN, "alt" FLOAT, "iud" BOOLEAN, "condom_with_spermicide" BOOLEAN, "gender" TEXT, "meropenem" BOOLEAN, "non_q_wave_myocardial_infarction" BOOLEAN, "hbcab" BOOLEAN, "unstable_angina" BOOLEAN, "birth_control_pills" BOOLEAN, "cystic_fibrosis" BOOLEAN, "hbv_surface_antigen_hbsag" BOOLEAN, "oocytes" INT, "severe_dry_eyes" BOOLEAN, "afc" INT, "morphological_characteristics" BOOLEAN, "ovarian_reserve_test" BOOLEAN, "atherectomy" BOOLEAN, "hiv_infection" BOOLEAN, "hormonal_contraceptives" BOOLEAN, "mellitus" BOOLEAN, "poor_ovarian_responder" BOOLEAN, "recurrent_heart_pain" BOOLEAN, "ast" FLOAT, "piperacillin" BOOLEAN, "coronary_conduit" BOOLEAN, "diabetic" TEXT, "elective" BOOLEAN, "ciprofloxacin" BOOLEAN, "colistin" BOOLEAN, "central_vision" BOOLEAN, "serological_tests" BOOLEAN, "inhaled_corticosteroids" BOOLEAN, "angina" BOOLEAN, "surgical_sterilization" BOOLEAN, "retinal_disease" BOOLEAN, "hcv_ab" BOOLEAN, "high_risk_clinical" BOOLEAN, "advanced_maternal_age" BOOLEAN, "antibiotic_treatment" BOOLEAN, "adequate_contraception" BOOLEAN, "uveitis_disease" BOOLEAN, "unprotected_left_main_coronary_artery" BOOLEAN, "ovarian_response" BOOLEAN, "acute_q_wave_myocardial_infarction" BOOLEAN, "urgent_coronary_balloon_angioplasty" BOOLEAN, "asthma" BOOLEAN, "serum_creatinine" FLOAT, "intrauterine_device" BOOLEAN, "kidney_disease" BOOLEAN, "spermicide" BOOLEAN, "fda_approved_device" BOOLEAN, "anti_hepatitis_c_virus_hcv_antibody" BOOLEAN, "active_scleral_disease" BOOLEAN, "barrier_methods" BOOLEAN, "tazobactam" BOOLEAN, "glaucoma" BOOLEAN, "cefepime" BOOLEAN, "depo_provera" BOOLEAN, "organ_failure" BOOLEAN, "dysthyroid_eye_disease" BOOLEAN, "peripheral_arterial_disease" BOOLEAN, "cerebral_infarction" BOOLEAN, "anti_hepatitis_b_core_antibody" BOOLEAN, "hypertension" BOOLEAN, "bilirubin" FLOAT, "risk_factor" BOOLEAN, "myocardial_infarction" BOOLEAN, "lupron_depot" BOOLEAN, "ocular" BOOLEAN, "age" FLOAT, "linezolid" BOOLEAN, "NOUSE" FLOAT)

patients referred for elective or urgent coronary balloon angioplasty or atherectomy with an fda _ approved device in one of the following settings: unstable angina or non _ q wave myocardial infarction, acute q _ wave myocardial infarction, or high _ risk clinical / morphological characteristics
SELECT * FROM table_test_31 WHERE (elective = 1 OR urgent_coronary_balloon_angioplasty = 1 OR atherectomy = 1) AND fda_approved_device = 1 AND (unstable_angina = 1 OR non_q_wave_myocardial_infarction = 1 OR acute_q_wave_myocardial_infarction = 1 OR high_risk_clinical = 1 OR morphological_characteristics = 1)
SELECT * FROM "table_test_31" WHERE ("acute_q_wave_myocardial_infarction" = 1 OR "high_risk_clinical" = 1 OR "morphological_characteristics" = 1 OR "non_q_wave_myocardial_infarction" = 1 OR "unstable_angina" = 1) AND ("atherectomy" = 1 OR "elective" = 1 OR "urgent_coronary_balloon_angioplasty" = 1) AND "fda_approved_device" = 1