Oracle 5.0 Reference Manual page 991

Table of Contents

Advertisement

reverse order, add the
the
clause. The default is ascending order; this may be specified explicitly using the
ORDER BY
keyword. The default separator between values in a group is comma (","). To specify a separator
explicitly, use
SEPARATOR
values. To eliminate the separator altogether, specify
The result is truncated to the maximum length that is given by the
system variable, which has a default value of 1024. The value can be set higher,
although the effective maximum length of the return value is constrained by the value of
max_allowed_packet
at runtime is as follows, where
SET [GLOBAL | SESSION] group_concat_max_len = val;
The return value is a nonbinary or binary string, depending on whether the arguments are nonbinary
or binary strings. The result type is
than or equal to 512, in which case the result type is
5.0.19,
GROUP_CONCAT()
than 512 only if the query included an
See also
CONCAT()
MAX([DISTINCT] expr)
Returns the maximum value of expr.
returns the maximum string value. See
keyword can be used to find the maximum of the distinct values of expr, however, this produces the
same result as omitting DISTINCT.
[971]
returns
MAX()
mysql>
SELECT student_name, MIN(test_score), MAX(test_score)
->
FROM student
->
GROUP BY student_name;
For
[971], MySQL currently compares
MAX()
than by the string's relative position in the set. This differs from how
is expected to be rectified in a future MySQL release.
MIN([DISTINCT] expr)
Returns the minimum value of expr.
returns the minimum string value. See
keyword can be used to find the minimum of the distinct values of expr, however, this produces the
same result as omitting DISTINCT.
[971]
returns
MIN()
mysql>
SELECT student_name, MIN(test_score), MAX(test_score)
->
FROM student
->
GROUP BY student_name;
For
[971], MySQL currently compares
MIN()
than by the string's relative position in the set. This differs from how
is expected to be rectified in a future MySQL release.
[971]
STD(expr)
Returns the population standard deviation of expr. This is an extension to standard SQL. As of
MySQL 5.0.3, the standard SQL function
This function returns
(Aggregate) Functions
GROUP BY
(descending) keyword to the name of the column you are sorting by in
DESC
followed by the string literal value that should be inserted between group
[466]. The syntax to change the value of
is an unsigned integer:
val
or
TEXT
[970]
returned
TEXT
ORDER BY
[887]
and
CONCAT_WS()
[971]
MAX()
Section 8.5.3, "How MySQL Uses
if there were no matching rows.
NULL
[971]
MIN()
Section 8.5.3, "How MySQL Uses
if there were no matching rows.
NULL
STDDEV_POP()
if there were no matching rows.
NULL
971
SEPARATOR
group_concat_max_len
group_concat_max_len
unless
BLOB
group_concat_max_len
or VARBINARY. (Prior to MySQL
VARCHAR
or
BLOB group_concat_max_len
clause.)
[888]:
Section 12.5, "String
[971]
may take a string argument; in such cases, it
and
columns by their string value rather
ENUM
SET
[971]
may take a string argument; in such cases, it
and
columns by their string value rather
ENUM
SET
[972]
can be used instead.
''.
[453]
[453]
greater
Functions".
Indexes". The
DISTINCT
compares them. This
ORDER BY
Indexes". The
DISTINCT
compares them. This
ORDER BY
ASC
[453]
[453]
is less

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents