How can I return aggregate results of the last 24 hours of a database table?

Set the field names to use your desired aggregate functionsExample: AVG(myField), MIN(myField), MAX(myField), and SUM(myField).

In the Query String property enter the following:

WHERE DateAndTime <= CURRENT_TIMESTAMP AND DateAndTime > DATEADD(hh,-24,CURRENT_TIMESTAMP)