query last attachments for home page