select A.id_documento, B.piva ,A.`progDocumento`, A.* from DOCUMENTO as A inner join CLIFOR as B on A.id_clifor= B.id_clifor where B.piva is not null and A.id_esercizio=2018 order by A.`progDocumento` desc;