clearance query + database ok