Skip to main content

Celonis Product Documentation

AND
Description

<left logical expression> AND <right logical expression> evaluates to true, when the left and the right hand side logical expressions are true. Evaluates to false otherwise.

Parentheses may be used to simply make the complete logical expression more readable, but can also be used to change the meaning of the complete logical expression. This is possible through the order of precedence for logical expressions, described in the Functions and Operators section.

Syntax
 logical expression AND logical expression
NULL handling

PQL implements a three-valued logic system with the following truth table:

aba AND b
truetruetrue
truefalsefalse
trueNULLNULL
falsefalsefalse
falseNULLfalse
NULLNULLNULL
Examples

[1]

AND in a CASE WHEN context.

Query

Column1

         CASE WHEN "Table1"."Column1" > 2 AND "Table1"."Column1" < 4 THEN "Table1"."Column1" ELSE null END
        

Input

Output

Table1

Column1 : int

1

3

5

Result

Column1 : int

null

3

null

[2]

AND in a FILTER context.

Query

Filter

         FILTER ( "Table1"."Column1" < 4 ) AND ( "Table1"."Column2" > 12 );
        

Column1

         "Table1"."Column1"
        

Column2

         "Table1"."Column2"
        

Input

Output

Table1

Column1 : int

Column2 : int

1

11

3

13

5

15

Result

Column1 : int

Column2 : int

3

13

[3]

AND in a PU_SUM context, specifically the filter part of the Pull-Up-Function.

Query

Column1

         "companyDetail"."companyCode"
        

Column2

         PU_SUM ( "companyDetail" , "caseTable"."value" , ( "caseTable"."value" > 250 ) AND ( "caseTable"."value" < 500 ) )
        

Input

Output

caseTable

caseId : int

companyCode : string

value : int

1

'001'

600

2

'001'

400

3

'001'

200

4

'002'

300

5

'002'

300

6

'003'

200

companyDetail

companyCode : string

country : string

'001'

'DE'

'002'

'DE'

'003'

'US'

Foreign Keys

caseTable.companyCode

companyDetail.companyCode

Result

Column1 : string

Column2 : int

'001'

400

'002'

600

'003'

null