Logidav Docs

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
author

Andrew Mackrodt andrew@ajmm.org

version
2011.06.12

Table of Contents

Properties

$expr1  : mixed
$expr2  : mixed
$inverse  : mixed

Methods

getSql()  : mixed
parse()  : mixed

Properties

$inverse

private mixed $inverse = false

Methods

getSql()

public getSql(SqlWalker $sqlWalker) : mixed
Parameters
$sqlWalker : SqlWalker

parse()

public parse(Parser $parser) : mixed
Parameters
$parser : Parser

        
On this page

Search results