CountIf
extends FunctionNode
in package
Usage: COUNTIF(expr1, expr2 [ INVERSE ])
COUNTIF() returns the COUNT of rows where expr1 = expr2 by internally constructing a case statment so that the expression COUNT(CASE expr1 WHEN expr2 THEN 1 ELSE NULL END) is evaluated.
The function is able to return the COUNT of rows where expr1 <> expr2 by passing the parameter INVERSE, i.e. COUNTIF(expr1, expr2 INVERSE).
Tags
Table of Contents
Properties
Methods
Properties
$expr1
private
mixed
$expr1
$expr2
private
mixed
$expr2
$inverse
private
mixed
$inverse
= false
Methods
getSql()
public
getSql(SqlWalker $sqlWalker) : mixed
Parameters
- $sqlWalker : SqlWalker
parse()
public
parse(Parser $parser) : mixed
Parameters
- $parser : Parser