Previous query was not compatible with some sqlite3 build. This one should work anyway