How can I write an aggregation function for muti columns. For example, I want to get the maximum number of column [A] depends on column [D] and [C].
Is there a valid syntax to fulfill the task, like maximum([A] for ([D] and [C]))? (This one is illegal)
The max function is evaluated against other non-aggregates within the query automatically. If you want to apply a context (evaluate against a limited set of columns) then you use the for predicate.
for 2 columns: maximum([A] for [col1],[col2])
In your example what is [C] ?
Quote from: blom0344 on 31 Oct 2013 03:39:54 PM
The max function is evaluated against other non-aggregates within the query automatically. If you want to apply a context (evaluate against a limited set of columns) then you use the for predicate.
for 2 columns: maximum([A] for [col1],[col2])
In your example what is [C] ?
Sorry, I was using [ B ] and this one was explained as BOLD... Thanks for your suggestion. I'll have a try