fix unprotected variable in SQL example