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 |
|
srucker
Starting Member
26 Posts |
Posted - 2010-02-09 : 14:13:54
|
| How should I query this dataset to get the % of total rows where column B = 1A 1B 1C 1D 1E 0F 0G 0 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-09 : 14:17:56
|
| [code]SELECT SUM(CASE WHEN B=1 THEN 1 ELSE 0 END) * 100.0/COUNT(*)FROM table[/code]------------------------------------------------------------------------------------------------------SQL Server MVP |
 |
|
|
|
|
|