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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query help

Author  Topic 

Tambam
Starting Member

14 Posts

Posted - 2011-02-22 : 17:02:53
Solved thanks

mandm
Posting Yak Master

120 Posts

Posted - 2011-02-22 : 17:20:46
Does it return anything if you comment out the WHERE clause?
Go to Top of Page

Tambam
Starting Member

14 Posts

Posted - 2011-02-22 : 17:26:38
Yeah. It gives me the number of properties by the property type, but not just the 'sold' properties :(
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2011-02-22 : 17:44:08
SELECT TypeOfProperty, COUNT(*) AS NumberSold
FROM SaleProperty
WHERE PropertyStatus = 'Sold'
GROUP BY TypeOfProperty;
Go to Top of Page

Tambam
Starting Member

14 Posts

Posted - 2011-02-22 : 18:09:24
Doh! How did I not spot that? Thank you! :D
Go to Top of Page
   

- Advertisement -