Basic HAVING handling
Fix function name position
Fix handling of EXISTS-like conditions