我现在的查询是:
Select
avg(a.TimeRetrieval) as "Retrieval time",
avg(a.TimeProcessing) as "Processing time",
avg(a.TimeRendering) as "Rendering Time",
(avg(a.TimeRetrieval)+avg(a.TimeProcessing)+avg(a.TimeRendering)) AS "AvgTotalTime"
from TimeLog a
我知道添加3列有问题,但无法找出核心语法。
答案 0 :(得分:2)
试试这个
SELECT [Retrieval time],
[Processing time],
[Rendering Time],
[Retrieval time]+[Processing time]+[Rendering Time] AS "AvgTotalTime"
FROM
(
Select
avg(a.TimeRetrieval) as "Retrieval time",
avg(a.TimeProcessing) as "Processing time",
avg(a.TimeRendering) as "Rendering Time"
from TimeLog a
)M