Query Group By Hour

Query Group By Hour

Post by kisetsuke » Sat, 21 Jun 2008 19:43:54


Hi

i m new in informix.i would like to create a report, which show record
by hourly.
i trying to do a query by group by hour. But i fail to find any
method.

eg:

Defect Code Hour Total Input
-------------------------------------------
D1 7 45
D1 8 56
D1 9 10
D1 10 69

Anyone got idea for this?
Thanks in advance
 
 
 

Query Group By Hour

Post by Obnoxio Th » Sat, 21 Jun 2008 19:47:38


XXXX@XXXXX.COM said:

SELECT defect_code, hour, sum(input)
FROM table
WHERE whatever
GROUP BY 1, 2
ORDER BY 1, 2

???

--
Bye now,
Obnoxio

"There were a myriad of problems which conspired to corrupt your reason
and rob you of your common sense. Fear got the best of you, and in your
panic you turned to the Labour Party. They promised you order, they
promised you peace, and all they demanded in return was your silent,
obedient consent."

 
 
 

Query Group By Hour

Post by Fernando N » Sun, 22 Jun 2008 06:42:56


If this doesn't solve the issue we'll need some table schema and a few lines of
the data...

Regards