resql query and eventrendering