Root rule optional SQL