How to get a specific number of rows in Java from an object database?
I need to get the result for the query: SELECT COUNT(id) FROM Users WHERE banned=true
SELECT COUNT(id) FROM Users WHERE banned=true
Try using * as a field:
SELECT COUNT(*) as count FROM Users WHERE banned = false
OrientDB supports SQL as queries , and also supports the function count(<field>|*)according to the documentation: http://code.google.com/p/orient/wiki/SQLWhere#Functions
count(<field>|*)