title: select all with where using alias
body: <p>I created a table like this:</p>
  
  <pre><code>CREATE TABLE test (
    id INT,
    name VARCHAR(255),
    birthdate DATE
  );
  
  INSERT INTO test (id, name, birthdate) VALUES (1, 'jhon', '1975-12-12');
  INSERT INTO test (id, name, birthdate) VALUES (2, 'doe', '1994-12-12');
  </code></pre>
  
  <p>And tried to query like this:</p>
  
  <pre><code>select * 
  from (
      select extract(year from age(birthdate)) as age from test
  ) d
  where d.age &gt;= 24
  </code></pre>
  
  <p>It works for the most part. What I wanted was to be able to query using <code>WHERE</code> on the <code>age</code>alias. The thing is that I needed to <em>"encapsulate"</em> it in another query as I read here in the forum already that I can't use <code>WHERE</code> in aliases unless using like this.</p>
  
  <p>The problem: it's returning only <code>age</code>, even adding <code>select *</code> it's not returning the other fields, what am I doing wrong?</p>
  
  <p>Here if you want to see running live: <a href="https://www.db-fiddle.com/f/qA8znjMzm4NR9wdCo5pssX/0" rel="nofollow noreferrer">https://www.db-fiddle.com/f/qA8znjMzm4NR9wdCo5pssX/0</a></p>