SQL changes

SQL restructured to be person focused rather than group focused, code
changed to accomodate