The order of attributes in the SELECT clause is not determined alphabetically or by the position on the template.
Consider a report with the attributes "Brand" and "Customer State" and the metrics "Revenue" and "Cost," illustrated below:

The report generates the following SQL:
select a15. AS CUST_STATE_ID,
a12. AS BRAND_ID,
sum((a11. * (a11. - a11.))) AS Revenue_test
from a11,
a12,
a13,
a14,
a15
where a11. = a12. and
a11. = a13. and
a13. = a14. and
a14. = a15.
and a13. = 1
group by a15.,
a12.
create index ZZMD00_i on ZZMD00 (CUST_STATE_ID, BRAND_ID)
Customer State is selected before Brand regardless of the order in which attributes are placed on the template.
In order for a user to change the order of attributes used in the SELECT clause, the Attribute Weights must be altered. To do this, perform the following steps:


For more details on Attribute Weights, refer to the following Strategy Knowledge Base document:
KB8983: What is the “Attribute weights” setting in MicroStrategy Developer 9.x.