FirebirdSQL logo

LIST Examples

  1. Retrieving the list, order undefined:

    SELECT LIST (display_name, '; ') FROM GR_WORK;
  2. Retrieving the list in alphabetical order, using a derived table:

    SELECT LIST (display_name, '; ')
    FROM (SELECT display_name
          FROM GR_WORK
          ORDER BY display_name);
See also

SELECT

MAX()

Maximum

Result type

Returns a result of the same data type the input expression.

Syntax
MAX ([ALL | DISTINCT] <expr>)
Table 1. MAX Function Parameters
Parameter Description

expr

Expression.It may contain a table column, a constant, a variable, an expression, a non-aggregate function or a UDF.Aggregate functions are not allowed as expressions.

MAX returns the maximum non-NULL element in the result set.

  • If the group is empty or contains only NULLs, the result is NULL.

  • If the input argument is a string, the function will return the value that will be sorted last if COLLATE is used.

  • This function fully supports text BLOBs of any size and character set.

Note

The DISTINCT parameter makes no sense if used with MAX() as it doesn’t change the result;it is implemented only for compliance with the standard.