> Hello, I am new to sqlite and I wish to get the count of unique entries > in a particular field. The table is created as follows:
> I get an error with the query: > select (distinct fieldname) from tablename; > but this gives me the wrong answer: > select distinct (fieldname) from tablename; That statement will get you the distinct records themselves, and you could count by looping through the records. However, if all you want is the count of records, you need to use: select count(distinct fieldname) from tablename or whatever the syntax is for count.