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 |
|
cognos
Starting Member
10 Posts |
Posted - 2011-10-19 : 02:18:31
|
| i have country and products.i have to show total products for each country.ddd |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-19 : 04:25:09
|
| group by country and take sum(products)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
sqlmaster555112
Starting Member
13 Posts |
Posted - 2011-10-19 : 13:15:03
|
| Hi check thisSelect country,count(products) from cognos_tablegroup by countryThis will give u the count of products for each country.....@sqlmasterhttp://www.intelcs.com/SQL_Server_Consultant.aspx |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-10-21 : 03:13:32
|
quote: Originally posted by sqlmaster555112 Hi check thisSelect country,count(products) from cognos_tablegroup by countryThis will give u the count of products for each country.....@sqlmasterhttp://www.intelcs.com/SQL_Server_Consultant.aspx
The OP wants total of products so count should be SUMMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|