Sometimes when dealing with dashboards/reports you need some flexibility while writing your Sql Queries, for this reason you may need a Fluent Query Builder, check out http://sqlkata.com a SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql and PostgreSql