You are here: Re: Update - can I do better statement? « MsSQL Server « IT news, forums, messages
Re: Update - can I do better statement?

Posted by Ed Murphy on 12/02/06 23:21

rcamarda wrote:

> Your suggestion for the new SQL: Is your point that since I am using a
> where clause, it is redundant to have the additional group by's?

That, and also
GROUP BY STUDENT_ID
HAVING SUM(ACTIVITY_COUNT) > 0
will pick up the same students as
GROUP BY SESSION_ID, STUDENT_ID, STUDENT_STATUS
HAVING SUM(ACTIVITY_COUNT) > 0
(assuming that ACTIVITY_COUNT is never negative).

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация