This is misc SQL that has been used and may be handy for future reference