69.Oracle数据库SQL开发之高级查询——用位置标记和符号标记访问数据单元Sales_amount[1,2004],其中1代表月份,2004代表年份。这种方式成为位置标记,因为维度的含义是通过其位置决定的。可以使用符号标记显示指定维度的含义。store@PDB1selectprd_type_id,year,month,sales_amountfromall_saleswhereprd_type_idbetween1and2andemp_id=21modelpartitionby(prd_type_id)dimensionby(month,year)measures(amountsales_amount)(sales_amount[month=1,year=2004]=sales_amount[month=1,year=2003],sales_amount[month=2,year=2004]=sales_amount[month=2,year=2003]+sales_amount[month=3,year=2003],sales_amount[month=3,year=2004]=ROUND(sales_amount[month=3,year=2003]*1.25,2))orderbyprd_type_id,year,month;PRD_TYPE_IDYEARMONTHSALES_AMOUNT-------------------------------------------12003110034.8412003215144.6512003320137.8312003425057.4512003517214.5612003615564.6412003712654.8412003817434.8212003919854.57120031021754.19120031113029.73120031210034.842200311034.842200321544.652200332037.832200342557.452200351714.562200361564.642200371264.842200381734.822200391854.5722003102754.1922003111329.7322003121034.8424rowsselected.使用位置或符号标记之间有一个区别需要了解,即他们处理维度中空值的方式不同。