title: multiply a count result sql
body: <p>I have two databases with data i need to link.
  one has activities and how much they cost.
  the other has how many people are signed up for each one.
  i used a count/group by activity on the second one and it gives me a total result of how many people are signed up to each activity. however, because this is a count, i'm unable to then multiply it with the fee from the other table.
  i tried using set/declare with the count value to have it as a variable i could multiply, but it kept returning an "unknown variable" result.
  anyone can think of how this can be done? i've heard of maybe using a left join?
  total noob here. thanks :)</p>
  
  <p>EDIT:</p>
  
  <pre><code>activity (child_id, activity_id) 
  </code></pre>
  
  <p>each activity has an id and each child has an id. these are on the children and activity databases. this is what tells me how many people are signed up to each activity. the activity database has an activity name and activity cost. </p>
  
  <p>I tried </p>
  
  <pre><code>select count (*) 
  from childactivity 
  group by activity_id 
  </code></pre>
  
  <p>to get me the total children signed up to each activity, but cant multiply this with the activity price because its a count result</p>