1. A method, comprising: identifying, in a first query, a first expression that includes a column name identifying a table column; and rewriting said first query to form a second query that includes a conditional expression that returns a value from the table column only when a condition is satisfied; wherein rewriting said first query to form said second query includes creating: (a) a second expression that includes a first alias that refers by said column name to said conditional expression, and (b) a third expression that includes a second alias that refers to said table column; wherein the method is performed by one or more computing devices.