KB-20214: SQL function to calculate maximum, minimum, and average values.

Question:

How can I set an SQL query (Access database) to retrieve the tag’s maximum, minimum, and average values?

Solution:

To do so, you must use MAX, MIN, and AVG functions.

Example of SQL query:

SELECT MAX(Historic.TagDemo1) AS MAXIMUM, Min(Historic.TagDemo1) AS MINIMUM, AVG(Historic.TagDemo1) AS AVERAGE
FROM Historic

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *