Expression¶
The value of the column: a column name, a relation path, a calculation or an aggregate, such as Customer.Name, Quantity * UnitPrice or Sum(Amount).
Type¶
string
Declaration¶
1 | |
Remarks¶
An expression can contain:
- column names and relation paths, such as
AmountorCustomer.Region.Name - aggregate functions:
Count,CountDistinct,Sum,SumDistinct,Avg,AvgDistinct,Min,Max,StdDev, such asSum(Amount) - date functions:
Now(),DatePart(part, date),DateTrunc(part, date),DateDiff(part, from, to), wherepartis one of'Year','Quarter','Month','Week','Day','Hour','Minute','Second' - integer constants,
+,-,*,/and parentheses, such asQuantity * UnitPrice
Function names are case-insensitive. When an expression contains more than one - or / operator, use parentheses to make the evaluation order explicit.
Aggregate columns group the result by the other, non-aggregate columns.
Examples¶
Calculated and aggregate columns¶
1 2 3 4 5 6 | |