And blazer[0], the closest thing to a perfect BI tool. It has a SQL editor/runner, saved queries, audit history, dashboards, alerts and user access control; all in a rails engine you can mount with minimal configuration.
Blazer is my favourite BI tool by a country mile. It does all I want with no fuss, is a breeze to set up and it's so much faster and more efficient than any of the other BI tools I've tried.
[0]https://github.com/ankane/blazer