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 |
annamaria
Starting Member
30 Posts |
Posted - 2007-06-10 : 07:22:51
|
review |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-06-10 : 16:04:10
|
There are max and isnull function, check books online to see if useful. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-27 : 12:00:41
|
quote: Originally posted by annamaria review
why are you removing original questions. please refrain from doing that |
|
|
rjackman1959
Yak Posting Veteran
60 Posts |
Posted - 2008-12-27 : 18:06:26
|
Not sure if this is what your looking for, but here is an example. I'm pretty new to SQL, so I'm sure there is a better way.select o_cust as 'Customer', COUNT(o.ord_number) as 'Number Of Orders', MAX(o.t_miles) as 'Total Miles'from order as owhere o.printed is NULLgroup by o.custorder by o.cust |
|
|
|
|
|