tags:

views:

42

answers:

3

Hi, 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
A: 

That isn't a subquery. You only have 1 from...

Kendrick
And what @Robert'); DROP TABLE Students; -- said.
Kendrick
+1  A: 

That doesnot work, try this

select sum(time) as sumtime from table
Srinivas Reddy Thatiparthy
A: 

I doesn't appear that you even NEED a subquery, as this will work:

SELECT SUM(Time) as TimeSum
FROM Table
LittleBobbyTables