On So, 2012-09-16 at 17:17 +0100, John Clegg wrote:
> I have a table Members with 896 rows and a text field "Year2012". It
> contains "Paid" 156 times, "Comp" 13 times and the rest are null (confirmed
> in sqlitebrowser as "empty")
> 
> Back in the olden days when this table was in Access, select
> count("Year2013") from Members used to return 169. In LibreOfiice with the
> data stored in embedded HSQL it returns 169. In LibreOffice connecting to
> sqlite3 it returns 896.
> 
> Any ideas please?

You're probably looking for something like
SELECT COUNT(*) FROM Members WHERE Year2012='Paid'
or maybe even
SELECT Year2012, COUNT(*) FROM Members GROUP BY Year2012

All the best
Marcus Ilgner

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to