Views query alter methods
Views is a fantastic module that allows you to build complex database queries through configuration. However, I've found that a weird variation of the 80/20 rule applies to views: 80% of the time, the configuration will get you 100% of what you want, but 20% of the time, it will only get you 80% of what you want. That's where the views hooks are handy, especially hook_views_query_alter. I've used this many times - adding a where clause, modifying a field, etc.