|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I need to create a query that counts the number of users in a particular group in one column, of those users how many took a test in another column, and another column with locations..... or in other words:
locations # of people in local # of people who took a test A 100 22 B 123 68 with all of this infomation residing within the same table. Is this possible and if so how????????? |
|
#2
|
|||
|
|||
|
Code:
select location,count(*),count(case when tested = 'Yes' then 1 end) from t group by location |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Muliple Count statements in a Query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|