Made more progress on the member sql statements.