Use sqlite3_libversion(). See http://www.sqlite.org/capi3ref.html#sqlite3_libversion for details.
Im using 3.3.13, I will like if you can show a little snipped of how to go with something like the next.. (The following at sqlite prompt) create table some(xthing varchar, count integer); insert into some values("hi", 0); insert into some values("hi there", 0); update some set count = count +1 where xthing="hi"; update some set count = count +1 where xthing="hi"; update some set count = count +1 where xthing="hi"; update some set count = count +1 where xthing="hi there"; The following in C select * from some; // and in the callback after print the value of count and extract a random value...