patch #544: fix Project Latest Documents query: sql query