Hello,
I'm new using SQL server management studio and I have a (probably very) simple question.
I've got a database with some columns amongst other, a simplified example:
LocationId / Amount:
728 / 5
728 / 4
730 / 0
730 / 43
735 / 0
What I want, is a COUNT function that counts if the Amount > 0 per location. So the output should be:
728 - 2
730 - 1
Of course, the real problem is more complex with more locations and rows, but this is the essence. I know how to count for one location, however to create a query with all locations I have some trouble.
Can anybody help me, is this possible in SQL or should I use a different program?
Best regards,
Robbert