Re: help_sql_please

From: John Flack <RHUZ94A_at_prodigy.com>
Date: 1996/06/02
Message-ID: <4oqt7b$26v0_at_usenetp1.news.prodigy.com>#1/1


The rule on GROUP BY is simple:

Columns that are selected in a SELECT command with a GROUP BY clause must either be included in the GROUP BY or must be enclosed in a summary function. The summary functions are AVG, SUM, MIN, MAX, COUNT, STDDEV, and VARIANCE (I may have the last two spelled wrong - going by memory here).

When you are including an expression in a GROUP BY clause, such as a DECODE function, it is usually easier to use a column alias, since expressions must be coded in the GROUP BY EXACTLY the same way as in the SELECT list. Received on Sun Jun 02 1996 - 00:00:00 CEST

Original text of this message