\Drupal::database()->select with Expression used as Condition I am trying to execute this query:

'SELECT sd.entity_id AS entity_id, WEEK(node__field_start_date.field_start_date_value) AS week, YEAR(node__field_start_date.field_start_date_value) AS year
FROM
{node__field_start_date} sd
INNER JOIN {node__field_plane_reservation} pr ON sd.entity_id = pr.entity_id
WHERE (sd.bundle = :db_condition_placeholder_0) AND (pr.field_plane_reservation_target_id = :db_condition_placeholder_1) AND (week = :db_condition_placeholder_2) AND (year = :db_condition_placeholder_3)'


And I am using this piece of code:

    $database = \Drupal::database();
    $query = $database-&gt;select('node__field_start_date', 'sd')
  -&gt;fields('sd', ['entity_id']);

    // Expressions
    $query-&gt;addExpression('WEEK(sd.field_start_date_value)', 'week');
    $query-&gt;addExpression('YEAR(sd.field_start_date_value)', 'year');

    // Conditions
    $query
  -&gt;condition('sd.bundle', 'reservation', '=')
  -&gt;condition('pr.field_plane_reservation_target_id', $refPlane, '=')
  -&gt;condition('week', $weekNo, '=')
  -&gt;condition('year', $weekYr, '=');

    // Join Tables
    $query-&gt;join('node__field_plane_reservation', 'pr', 'sd.entity_id = pr.entity_id');


And whenever I execute it, it give me the error:
Unknown Column 'week' in query or Unknown column 'year'.
How do I use a condition with a pseudo column created with an expression?
// Where Expressions
    $query-&gt;where('WEEK(sd.field_start_date_value) = :weekNo', array(':weekNo' =&gt; $weekNo));
    $query-&gt;where('WEEK(sd.field_start_date_value) = :weekYr', array(':weekYr' =&gt; $weekYr));


Apparently this can be achieved with $query->where();