Reputation: 12695
I need fast answer (I can't check that code right now):
is that query works ? I need to get the total sum of a column values from the subquery, something like that:
select sum(select time from table) as sometimes group by sometimes
Upvotes: 1
Views: 1037
Reputation: 11
select avg(field_val)
from table1
where field_val in (
SELECT TOP 3 field_val
FROM table1
ORDER BY field_val DESC
)
Upvotes: 1
Reputation: 11155
That doesnot work, try this
select sum(time) as sumtime from table
Upvotes: 1