Use of AVG SQL function in Read Data

ra ranton 03 Jun, 2021
I've the following table:
id fascia_oraria tariffa
===========================
1 6-12 ore 21.80
2 12-18 ore 33.02
3 18-24 ore 41.16
Aciont Read Data with Action Name = read_media_minimi_tabellari

In the Read Data I've used Query Fields as Advanced Setting and put the following values:

New Fileds = AVG(tariffa)
Field Alias = MediaTariffeTabellari

Then I've a Text Field that have as Value:

{var:read_media_minimi_tabellari}

And the result is: "31.993333 1 6-12 ore 21.80"

The average has been well calculated, but why it shows also the first record of the table?

Thanks.
This topic is locked and no more replies can be posted.