"select {[Measures].[Unit Sales]} on columns, "
+ "non empty CrossJoin({[Gender].[M]},{[Marital Status].[M]}) on rows "
+ "from [Sales] ";
SqlPattern[] patterns = {
new SqlPattern(
ACCESS_MYSQL,
"select "
+ "`agg_g_ms_pcat_sales_fact_1997`.`gender` as `c0`, "
+ "`agg_g_ms_pcat_sales_fact_1997`.`marital_status` as `c1` "
+ "from "
+ "`agg_g_ms_pcat_sales_fact_1997` as `agg_g_ms_pcat_sales_fact_1997` "
+ "where "
+ "(`agg_g_ms_pcat_sales_fact_1997`.`gender` = 'M') "
+ "and (`agg_g_ms_pcat_sales_fact_1997`.`marital_status` = 'M') "
+ "group by "
+ "`agg_g_ms_pcat_sales_fact_1997`.`gender`, "
+ "`agg_g_ms_pcat_sales_fact_1997`.`marital_status` "
+ "order by "
+ "ISNULL(`agg_g_ms_pcat_sales_fact_1997`.`gender`) ASC, "
+ "`agg_g_ms_pcat_sales_fact_1997`.`gender` ASC, "
+ "ISNULL(`agg_g_ms_pcat_sales_fact_1997`.`marital_status`) ASC, "
+ "`agg_g_ms_pcat_sales_fact_1997`.`marital_status` ASC",
null)
};
assertQuerySqlOrNot(
getTestContext(), query, patterns, false, false, false);
assertQueryReturns(
query,
"Axis #0:\n"
+ "{}\n"
+ "Axis #1:\n"
+ "{[Measures].[Unit Sales]}\n"
+ "Axis #2:\n"
+ "{[Gender].[M], [Marital Status].[M]}\n"
+ "Row #0: 66,460\n");
// This second query verifies that joined levels on aggregate tables
// load correctly.
String query2 =
"select {[Measures].[Unit Sales]} ON COLUMNS, "
+ "NON EMPTY {[Store].[Store State].Members} ON ROWS "
+ "from [Sales] where [Time].[1997].[Q1]";
SqlPattern[] patterns2 = {
new SqlPattern(
ACCESS_MYSQL,
"select "
+ "`store`.`store_country` as `c0`, "
+ "`store`.`store_state` as `c1` "
+ "from "