title: How to select multiple fields in the same row? (MySQL)
body: <p>I <a href="https://stackoverflow.com/questions/2111523/how-would-i-perform-math-within-a-sql-query-to-calculate-percent-difference">asked a question yesterday</a> about using MySQL to tally results to a survey.</p>
  
  <p>Now my question is, if I had a table of survey questions, a table of survey choices, and a table of users answers to those survey questions, how would I select the survey question along with all the choices for that survey within the same query?</p>
  
  <p>Questions Table</p>
  
  <pre><code>question_id (int)
  question (text)
  </code></pre>
  
  <p>Choices Table</p>
  
  <pre><code>choice_id (int)
  question_id (int)
  choice_text (varchar)
  </code></pre>
  
  <p>Answers Table</p>
  
  <pre><code>answer_id (int)
  question_id (int)
  choice_id (int)
  </code></pre>
  
  <p>What SELECT should I do to get the survey question along with all the choices for that survey (known or unknown amount) all in the same query? (if possible, also do the math, found in my other question,  within the same query)</p>
  
  <p>I'm not so advanced with MySQL.</p>
  
  <p>Thanks</p>
  
  <p><b>EDIT: </b>
  Sorry, What I meant was, I'm trying to get a SELECT statement to select the question, and all the choices corresponding to that question, in one row.</p>
  
  <p>If I do something like</p>
  
  <pre><code>SELECT question_id, question, choice_id, choice_text FROM questions LEFT JOIN choices USING(question_id)
  </code></pre>
  
  <p>I get multiple rows, one for each choice_id. </p>
  
  <p>The results should be something like</p>
  
  <pre><code>question     choice_1  choice_2  choice_3
  A or B or C     A          B        C
  </code></pre>
  
  <p>The math part is tallying up the results to the survey, and yes, the choice_id is a PK, if that helps.</p>