public void GroupByQueryWithOrderByFieldNotInSelectList() { IEnumerable <Person> source = TestData.GetPeople(); var result = source.Query <Person, IDictionary <string, object> >("SELECT Address, Avg(age) as A FROM this GROUP BY Address ORDER BY Name"); }
public void LongGroupByExpressionGenerateExpcetion() { IEnumerable <Person> source = TestData.GetPeople(); var result = source.Query <Person, IDictionary <string, object> >("SELECT Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9, Avg(age) as A FROM this GROUP BY Name1, Name2, Name3, Name4, Name5, Name6, Name7, Name8, Name9"); }
public void DistinctQueryWithOrderByFieldNotInSelectList() { IEnumerable <Person> source = TestData.GetPeople(); var result = source.Query <Person, IDictionary <string, object> >("SELECT DISTINCT Name FROM this ORDER BY Age"); }
public void WhereClauseWithAggregate() { IEnumerable <Person> source = TestData.GetPeople(); var result = source.Query <Person, IDictionary <string, object> >("SELECT Age FROM this WHERE Avg(Age) > 40"); }
public void GroupByWithoutAggregate() { IEnumerable <Person> source = TestData.GetPeople(); var result = source.Query <Person, IDictionary <string, object> >("SELECT Address FROM this GROUP BY Address"); }
public void AggregateWithoutGroupBy() { IEnumerable <Person> source = TestData.GetPeople(); var result = source.Query <Person, IDictionary <string, object> >("SELECT Name, Count(*) FROM this"); }
public void SelecFieldtWithoutGroupingOnIt() { IEnumerable <Person> source = TestData.GetPeople(); var result = source.Query <Person, IDictionary <string, object> >("SELECT Name, Address, Avg(Age) AS AverageAge FROM this GROUP BY Address"); }