Define query of Sqlite Database.