select * from av where activo='SI' and tipo='V'order by id desc limit 1
Luis no sabe leer