SQL clauses
This list includes clauses currently supported by Network Reporting.
case
CASE clauses can be used wherever an expression is valid. The condition is an expression that returns a Boolean result. If the result is True then the value of the CASE expression is the result that follows the condition. If the result is False any subsequent WHEN clauses are searched similarly. If no WHEN condition is True, the value of the case expression is the result in the ELSE clause. If the ELSE clause is omitted and no condition matches, the result is null.
CASE WHEN condition THEN result [WHEN ...] [ELSE result] END
Input
P B DT
Result
Doctor Business Other
having
Eliminates groups from a grouped table. Similar to the WHERE clause.
[ HAVING condition ]
limit
Causes a query to return no more rows that the LIMIT value. LIMIT ALL is the same as omitting the LIMIT clause.
SELECT column FROM table [LIMIT { number | ALL }] [OFFSET number]
offset
Skips a specified number of rows before returning rows. OFFSET 0 is the same as omitting the OFFSET clause altogether. If OFFSET and LIMIT are used, OFFSET rows are skipped before rows are counted toward the LIMIT value.
SELECT select_list FROM table_expression [LIMIT { number | ALL }] [OFFSET number]
where
Expression that returns a value of type Boolean in response to a specified condition.
WHERE search_condition
Input
-
Result
590878213387948036, William, Johnson Smith 590884383007805459, Fiona, Hegi-Johnson
with
Defines a subquery with a SELECT statement.
[ WITH with_subquery [, ...] ] SELECT expression FROM table [, ...]
Input
-
Result
-