<div dir="ltr">This is a long shot and I guess I&#39;m going to have to delve into the MySQL dialect stuff but I figured I&#39;d check to see if anyone had seen similar else where in mondrian:<div><br></div><div><a href="http://jira.pentaho.com/browse/MONDRIAN-2391">http://jira.pentaho.com/browse/MONDRIAN-2391</a><br></div><div><br></div><div>Basically I have 2 measure groups, they both run off the same fact table but they aggregaet differently so its nice to separate them. </div><div><br></div><div>When I run a Top count but add a measure from 2 different measure groups on MySQL I get incorrect SQL generated</div><div><br></div><div><div>select `earthquakes`.`place` as `c0`, count(`earthquakes`.`id`) as `c1` from `earthquakes` as `earthquakes` group by `earthquakes`.`place` union select `earthquakes`.`place` as `c0`, count(`earthquakes`.`id`) as `c1` from `earthquakes` as `earthquakes` group by `earthquakes`.`place`;</div></div><div><br></div><div>which causes</div><div><br></div><div><div>SQLException: Incorrect usage of UNION and ORDER BY</div></div><div><br></div><div>I tried messing with the union options in the mysql dialect but it didn&#39;t seem to make a difference.</div><div><br></div><div>Tom</div></div>