How to query the version of a sqlite db

Just run this query:

pragma user_version