# looking for countif functionality in my SQL



## raj08536

I am looking for distinct property and have a simple sql as below:

SELECT DISTINCT SFR_Jan_2022.Property INTO Uniq_Properties
FROM SFR_Jan_2022;

Can i count how many property unique value repeated in the table? similar to countif excel formula.


----------



## raj08536

I have also tried following:

SELECT Count(*) AS N FROM (SELECT DISTINCT SFR_Jan_2022.Property
FROM SFR_Jan_2022) as T;
but it gives me total number of properties. I want to know count of individual property.


----------



## raj08536

I found it
SELECT DISTINCT Step01_Data.Property, Sum(Step01_Data.CountA) AS SumOfCountA
FROM Step01_Data
GROUP BY Step01_Data.Property;


----------

