write query.html