Creating test_rule SQLQuery