Oracle Model Clause
SELECT country,prod, YEAR,sales FROM sales_view WHERE country IN ('Italy','Japan')
MODEL
RETURN UPDATED ROWS
PARTITION BY (country)
DIMENSION BY (prod, YEAR)
MEASURES (sale sales)
RULES(
sales['Bounce',2002] = sales['Bounce',2001] + sales['Bounce',2000],
sales['Y Box',2002] = sales['Y Box',2001],
sales['2_Products',2002] = sales['Bounce',2002] + sales['Y Box',2002],
sales['2_Products',2003] = 2*sales['2_Products',2002]
)
ORDER BY country, prod, YEAR;
其中紅色的部分是可選的。
partition與分析函式中的partition相似,而dimension可以看成是excel中的行與列的值。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70014873/viewspace-2868069/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle SQL Model ClauseOracleSQL
- About Oracle WITH clauseOracle
- ANALYZE INDEX clauseIndex
- ORA-01788: CONNECT BY clause required in this query block For ORACLE 10GUIBloCOracle 10g
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains 的問題 MySQLExpressAIMySql
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated cExpressAI
- ALTER SESSION ADVISE ClauseSession
- ALTER SYSTEM DISCONNECT SESSION ClauseSession
- Oracle Reporting 6 - ModelOracle
- Oracle Reporting 7 - Model ExamplesOracle
- In Oracle 10g,What is Time Model?Oracle 10g
- mysql主給備賦予許可權時報錯,MySQL [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clauseMySqlExpress
- oracle data Format Models---二(轉)OracleORM
- oracle 11g model子句的用法Oracle
- UNRECOVERABLE DATAFILE clause in the ALTER DATABASE CLEAR LOGFILE statementDatabase
- Oracle Database 10g Enhanced wait modelOracleDatabaseAI
- (轉載)ORACLE MODEL子句學習筆記Oracle筆記
- AutoPeftModel、AutoModel、PeftModel
- You can‘t specify target table ‘Person‘ for update in FROM clause
- ORA-01788: CONNECT BY clause required in this query blockUIBloC
- list is not in GROUP BY clause and contains nonaggre的問題AI
- MS-SQL 錯誤: The offset specified in a OFFSET clause may not be negativeSQL
- machine learning model(algorithm model) .vs. statistical modelMacGo
- SpringMVC裡的Model、Map、ModelMap以及ModelAndViewSpringMVCView
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggreExpressAI
- 建立Materialized view log時是否使用sequence clause的差別ZedView
- ModelViewSet-modelserializerView
- Oracle 12C 新特性之非分割槽錶轉分割槽表online clause(不停業務+索引有效)Oracle索引
- ModelViewSet+ModelSerializer使用View
- Spring中Model、ModelMap及ModelAndView之間的區別SpringView
- msql查詢中報錯 Unknown column '黃色水果' in 'where clause'SQL
- Reactor ModelReact
- OSI Model
- ModelFormORM
- Model Risk
- 透過案例學調優之--Oracle Time Model(時間模型)Oracle模型
- 不在models.py中的models
- mysql報錯:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggreMySqlExpressAI