I'm trying to run Audit data for our network. Here is the way the data is 
stored.
  ID DATE         Order Site  Wrong  Overpick Damage Missing
1 1/1/2008 7456345 NY 0 0 0 0
2 1/1/2008 8234645 NV 1 1 1 1
3 1/1/2008 1657768 PA 0 0 4 0
4 1/1/2008 3452345 CA 1 2 0 0
5 1/1/2008 2456524 KS 0 0 3 0
6 1/2/2008 4345345 NY 0 0 0 0
7 1/2/2008 8554345 NV 4 1 1 4
8 1/2/2008 3242343 PA 0 0 0 0
9 1/2/2008 2340505 CA 0 0 0 0
10 1/2/2008 3214234 KS 2 1 1 1
  I'm trying to output the results like this
           Total Orders Failed Orders Total Errors   Wrong   OverPick Damage  
Missing
1/1/2008 5       4  14        2 3  8     1
1/2/2008 5       2  15        6 2  2     5
      
  Total Orders: Count of ID's grouped in the Date
  Failed Orders: Should check to see if "wrong, overpick, damage, missing are > 
0. that marks it as a failed order.
  Total Errors: Sum of wrong, overpick, damage, missing 
  If anyone can help me with this query I would much appreciate it. I'm at a 
stand still on this.
  Thanks,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:3121
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6

Reply via email to