sqlcommand & # run the SQL command in the background
sqlpid=$! # store the PID
sleep $(( 10 * 60 )) # sleep for 10 mins
kill -0 $sqlpid && kill $sqlpid # if the process is still running, kill it