, Guest>> || || |
/ Microsoft SQL Server
  ...  [new]
NarkomaN
Member

:
: 36
: . _, , _, _. - _, _, _. _. , .

, (, , ), ?
4 06, 13:52[2521777]      |
 Re: ...  [new]
saint
Member

:
: 2262
select , SUM(_), SUM(_)
from  as a inner join  as b
on a._=b._
where (_ between @from AND @to) AND
_<@to
GROUP BY 
HAVING SUM(_)> SUM(_)
4 06, 14:22[2522018]      |
 Re: ...  [new]
pkarklin
Member

: ()
: 74930
SELECT
  ,
  SUM(_) AS ___,
  SUM(Q.___) AS ___) 
FROM
   T
  INNER JOIN
(SELECT
  _,
  SUM(_) AS ___
FROM
  
WHERE
  YEAR(_) = 2006
  GROUP BY _) AS Q ON
  T._ = Q._
WHERE
  YEAR(_) = 2006
GROUP BY
  
HAVING
  SUM(_) > SUM(Q.___) 
4 06, 14:31[2522077]      |
 Re: ...  [new]
NarkomaN
Member

:
: 36
! ... =))
4 06, 18:44[2523852]      |
1 .
 Re: ...  [new]
Hugo
Member

:
: 6

pkarklin
saint !!!!!!
27 11, 00:38[11188546]      |
/ Microsoft SQL Server