Hi,
I have a database with a table Categories that contains a column category.
In listview I want to show the list of categories and the record count for each category. Someone can indicate how to use the COUNT function with the GROUP BY in B4android?
Thanks in advance
Nicola
SQL syntax is not special in Basic4android. It is processed by the SQLite engine.
If you are using DBUtils you can use DBUtils.ExecuteListView. The query should be something like:
B4X:
SELECT category, count(category) FROM Categories GROUP BY category
Hi,
If you do not ask too much, I have a practical example on how to fill the listview with the category name and the record count in it? is probably simple but I can not figure it out.
thanks in advance
Nicola