I am execute the following query:
select priority,(avg(datediff(dateresolve,dateoccurred)) from table group by priority.
if I execute this in mysql I get:
+----------+--------------------------------------------+
| priority | avg(datediff(date_resolved,date_occurred)) |
+----------+--------------------------------------------+
| 1 | 0.0000 |
| 2 | 5.0604 |
| 3 | 0.9837 |
| 4 | 0.0564 |
| 5 | 0.2000 |
+----------+--------------------------------------------+
When I execute this query with a query control in Delphi , how do I get the results of 'avg(datediff(date_resolved,date_occurred)) ' ? I am able to get the results under priority but noot the calculated result of avg().
thanks
select priority,(avg(datediff(dateresolve,dateoccurred)) from table group by priority.
if I execute this in mysql I get:
+----------+--------------------------------------------+
| priority | avg(datediff(date_resolved,date_occurred)) |
+----------+--------------------------------------------+
| 1 | 0.0000 |
| 2 | 5.0604 |
| 3 | 0.9837 |
| 4 | 0.0564 |
| 5 | 0.2000 |
+----------+--------------------------------------------+
When I execute this query with a query control in Delphi , how do I get the results of 'avg(datediff(date_resolved,date_occurred)) ' ? I am able to get the results under priority but noot the calculated result of avg().
thanks