Creating 1rule SQLQuery