Search
 
SCRIPT & CODE EXAMPLE
 

SQL

cube oracle

 -- the CUBE extension will generate subtotals for all combinations of the 
 -- dimensions specified. If "n" is the number of columns listed in the CUBE,
 -- there will be 2^n subtotal combinations.
 
 SELECT fact_1_id,
       fact_2_id,
       fact_3_id,
       SUM(sales_value) AS sales_value
FROM   dimension_tab
GROUP BY CUBE (fact_1_id, fact_2_id, fact_3_id)
ORDER BY fact_1_id, fact_2_id, fact_3_id;
 
Comment

PREVIOUS NEXT
Code Example
Sql :: use mysql 8 without password 
Sql :: How to make PHP handeling my "WITH CTE as" SQL 
Sql :: sql tablo hangi sp de 
Sql :: sql countif 
Sql :: sql developer sql worksheet not showing 
Sql :: naming conventions postgres index 
Sql :: mysql delete connected entries from database 
Sql :: ring SQLite sqlite_open 
Sql :: oracle single row functions 
Sql :: select all column 
Sql :: disadvantages of stored procedures sql 
Sql :: how to get recent added primary key in sql 
Sql :: sqlalchemy where in query 
Sql :: get statis values sql 
Sql :: mysql Puede ser solamente un campo automatico y este debe ser definido como una clave 
Sql :: Find Last Fractal Function MQL4 
Sql :: declare table temporary sql server 
Sql :: select function with the column name we want to select 
Sql :: how to put value in parameters in mysqldataadapter 
Sql :: ring get a list of tables inside the database using the odbc_tables() 
Sql :: Uncomment listen_address=localhost 
Sql :: heavy table in mysql 
Sql :: hoq to import database source 
Sql :: sql menampilkan data tabel 
Sql :: How to do a cumulative count using Raw SQl / Laravel - Eloquent ORM 
Sql :: grant privileges when craeting a user 
Sql :: sqlite3 create table from another table 
Sql :: what is database username and password in mysqliconnect 
Sql :: dump sql databse import export 
Sql :: SQL Equal to Operator (=) 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =