List:General Discussion« Previous MessageNext Message »
From:Harald Fuchs Date:May 12 2005 9:09am
Subject: Re: Report(query)
View as plain text  
In article <20050511231512.39355.qmail@stripped>,
Seena Blace <sqlserverdb@stripped> writes:

> Hi,
> I want report like this
 
> date           process         pending     wip
 
> 5/10/05        10                30              40
> 5/11/05         09               28              60
> ------------------------------------------------------------
> Summary     19               58             100
 
 
 
> select date,sum(process),sum(pending),sum(wip) from tab
> group by date;
> What command I used to show heading and what command to show sub total and total ?

The last row can be calculated by the ROLLUP modifier of GROUP
(requires MySQL 4.1.1 or later).  Nicely formatting the output with
headings etc is not the business of a database engine and should be
done by your application.

Thread
Report(query)Seena Blace12 May
  • Re: Report(query)Harald Fuchs12 May
Re: Report(query)Seena Blace12 May
  • Re: Report(query)Eamon Daly12 May