Returns true if both arguments evaluate to true. Equivalent to the && operator.

Since the AND function returns a Boolean value, it can be used as a function or a conditional.

NOTE: Within an expression, you might choose to use the corresponding operator, instead of this function. For more information, see Logical Operators.

 

derive type:single value: AND(finalScoreEnglish >= 60, finalScoreMath >=60) as:'promoteStudent'

Output: If the values in the finalScoreEnglish and finalScoreMath columns are greater than or equal to 60, then the value in the new promoteStudent column is true. Otherwise, the value is false

derive type:single value:AND(value1, value2)

ArgumentRequired?Data TypeDescription
value1YstringThe first value must be a Boolean literal, column reference, or expression that evaluates to true or false.
value2YstringThe first value must be a Boolean literal, column reference, or expression that evaluates to true or false.

value1, value2

Expressions, column references or literals to compare as Boolean values.

Required?Data TypeExample Value
YesFunction or column reference returning a Boolean value or Boolean literalmyHeight > 2.00


Example - Logical Functions