L'ultimo record della TABELLA lo ottieni con quel codice se usi la


SELECT RIFERIMENTO FROM NEGOZIO