23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MIN<br />

Notes • Specifying DISTINCT has no effect on the result.<br />

MIN<br />

Syntax<br />

106<br />

• The argument column_ref or expression can be of any type.<br />

• The result of the function is of the same data type as that of the argument.<br />

• The result is NULL if the result set is empty or contains only NULL values.<br />

Returns the minimum value in a group of values.<br />

Example This example illustrates the MIN function:<br />

Notes • Specifying DISTINCT has no effect on the result.<br />

MINUTE<br />

Syntax<br />

SELECT order_date, product, MAX (qty)<br />

FROM orders<br />

GROUP BY order_date, product ;<br />

MIN ( { [ ALL ] expression } | { DISTINCT column_ref } )<br />

SELECT MIN (salary)<br />

FROM employee<br />

WHERE deptno = 20 ;<br />

• The argument column_ref or expression can be of any type.<br />

• The result of the function is of the same data type as that of the argument.<br />

• The result is NULL if the result set is empty or contains only NULL values.<br />

Returns the minute value in the argument as a short integer in the range of 0–59.<br />

MINUTE ( time_expression )<br />

Example This example illustrates the MINUTE function:<br />

SELECT *<br />

FROM arrivals<br />

WHERE MINUTE (in_time) > 10 ;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!