|Subject||RE: [ib-support] Newbie trying to understand the GROUP BY statement. Help!|
> What should I do if I want the groupedYou're trying to create a report. This is not done using SQL but using a
> rows totaled and returned as
> multiple rows?
reporting tool, such as FastReport or other tools.
SQL will return data rows belonging to a table. Each row contains
the same type of data and the same structure (columns). Since the
sums that you want are not the same type of data as the rest of the
data, I don't think you should try to make the SQL server calculate
the mix for you. Even though you could, using a stored procedure.
That's nothing for beginners though.
If you don't want to use a reporting tool, use two separate queries.
One for the ordered and grouped data, one for the sums.