title: Using alias from COALESCE from SELECT in WHERE clause
body: <p><strong><a href="https://dbfiddle.uk/?rdbms=mysql_5.7&amp;fiddle=c0f72eefd7e5cf5693b3504799a2369c" rel="nofollow noreferrer">DB Fiddle</a></strong></p>
  
  <pre><code>CREATE TABLE logistics (
      id int primary key,
      campaign VARCHAR(255),
      inbound_date VARCHAR(255),
      outbound_date VARCHAR(255)
  );
  
  INSERT INTO logistics
  (id, campaign, inbound_date, outbound_date)
  VALUES 
  ("1", "C001", "2019-01-01", "2019-02-08"),
  ("2", "C001", "2019-05-10", "2019-05-12"),
  ("3", "C001", "2019-06-12", "2019-06-15"),
  ("4", "C001", "2019-08-13", "2019-08-20"),
  ("5", "C001", "2019-11-14", "2019-11-22");
  </code></pre>
  
  <p>In the table above I have the columns <code>inbound_date</code> and <code>outbound_date</code> for date values. <br>
  In my query I <code>coalesce</code> them to one column called <code>event_date</code>.</p>
  
  <p>Now, I want to use the alias for the <code>coalesce</code> in the <code>WHERE</code> clause of my query but I get error <code>Unknown column 'event_date' in 'where clause'</code>:</p>
  
  <pre><code>SELECT
  campaign,
  coalesce(inbound_date, outbound_date) as event_date
  FROM logistics
  WHERE
  event_date BETWEEN "2019-06-01" AND "2019-10-01"
  </code></pre>
  
  <p>I know I could solve the issue by using the <code>inbound_date</code> and <code>outbound_date</code> as two seperate conditions in the <code>WHERE</code> clause but isn't there a smarter way using the alias of the <code>coalesce</code>?</p>