chapter6 sql work