| 79 | From the command line, to query for gender and birth date for specific diagnosis, into an outfile:# |
| 80 | |
| 81 | mysql -h briccsdb -u auditor -p briccs -e " |
| 82 | SELECT category_name, birth_date, gender |
| 83 | FROM participant, questionnaire_participant, question_answer, category_answer |
| 84 | WHERE participant.id = questionnaire_participant.participant_id |
| 85 | AND question_answer.questionnaire_participant_id = questionnaire_participant.id |
| 86 | AND question_answer.question_name = 'epi_pridiag' |
| 87 | AND category_answer.question_answer_id = question_answer.id |
| 88 | AND ( category_answer.category_name LIKE '%ACS%' OR category_answer.category_name = 'STEMI' OR category_answer.category_name = 'Stable Angina' ) |
| 89 | ; |
| 90 | " > mysql-output.txt |