Added tsdb style query to pulsedb