Brewfest: Reworked the sql's.