add coalesce to max thinge_num query for cases when someone is adding the very first entry for a particular thinge type