title: SQL query for counting multiple strings with one output
body: <p>I have a database including certain strings, such as '{TICKER|IBM}' to which I will refer as ticker-strings. My target is to count the amount of ticker-strings per day for multiple strings.</p>
  
  <p>My database table 'tweets' includes the rows 'tweet_id', 'created at' (dd/mm/yyyy hh/mm/ss) and 'processed text'. The ticker-strings, such as '{TICKER|IBM}', are within the 'processed text' row.</p>
  
  <p>At this moment, I have a working SQL query for counting one ticker-string (thanks to the help of other Stackoverflow-ers). What I would like to have is a SQL query in which I can count multiple strings (next to '{TICKER|IBM}' also '{TICKER|GOOG}' and '{TICKER|BAC}' for instance).</p>
  
  <p>The working SQL query for counting one ticker-string is as follows:</p>
  
  <pre><code>SELECT d.date, IFNULL(t.count, 0) AS tweet_count
  FROM all_dates AS d
  LEFT JOIN (
      SELECT COUNT(DISTINCT tweet_id) AS count, DATE(created_at) AS date
      FROM tweets
      WHERE processed_text LIKE '%{TICKER|IBM}%'
      GROUP BY date) AS t
  ON d.date = t.date
  </code></pre>
  
  <p>The eventual output should thus give a column with the date, a column with {TICKER|IBM}, a column with {TICKER|GOOG} and one with {TICKER|BAC}.</p>
  
  <p>I was wondering whether this is possible and whether you have a solution for this? I have more than 100 different ticker-strings. Of course, doing them one-by-one is an option, but it is a very time-consuming one.</p>