document sql.compound_forwards_query