Ksh Set Variable Sql Query Practice