Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
onderaydogan
Starting Member
6 Posts |
Posted - 2001-08-07 : 07:07:21
|
| i need a query to prepare a report for the production people at our factory site.database table is like this :stop_code stop_def duration continue--------- -------- -------- --------0122 fuse trip 15 0123 breaker trip 30 0123 breaker trip 12 X0123 breaker trip 50 0122 fuse trip 10my report should give a summary report like the one belowstop_code stop_def sum count--------- ------------ --- -----0122 fuse trip 25 20123 breaker trip 92 2tricky point is the duration and the continue columns! in the report, i want the total sum for every group but the count od groups should neglect the records with the 'X' .i did this with a temporary table and then a select.is there a one shot solution? |
|
|
|
|
|