Home
Search results “Oracle grouping set cube”
GROUP BY, ROLLUP and CUBE in Oracle
 
04:09
Here's a quick run through of GROUP BY, ROLLUP and CUBE, along with an example of using the GROUPING function. For more information see: https://oracle-base.com/articles/misc/rollup-cube-grouping-functions-and-grouping-sets Website: https://oracle-base.com Blog: https://oracle-base.com/blog Twitter: https://twitter.com/oraclebase Cameo by Kerry Osborne Blog: http://kerryosborne.oracle-guy.com/ Twitter: https://twitter.com/KerryOracleGuy Cameo appearances are for fun, not an endorsement of the content of this video.
Views: 16377 ORACLE-BASE.com
Grouping Sets in SQL Server
 
09:36
grouping sets examples in sql server sql server grouping sets order by grouping sql server 2008 grouping sets example sql server group by union all Grouping sets is a new feature introduced in SQL Server 2008. Let us understand Grouping sets with an example. We want to calculate Sum of Salary by Country and Gender. We can very easily achieve this using a Group By query as shown below Select Country, Gender, Sum(Salary) as TotalSalary From Employees Group By Country, Gender Within the same result set we also want Sum of Salary just by Country. To achieve the above result we could combine 2 Group By queries using UNION ALL as shown below. Select Country, Gender, Sum(Salary) as TotalSalary From Employees Group By Country, Gender UNION ALL Select Country, NULL, Sum(Salary) as TotalSalary From Employees Group By Country Within the same result set we also want Sum of Salary just by Gender. We can achieve this by combining 3 Group By queries using UNION ALL as shown below Select Country, Gender, Sum(Salary) as TotalSalary From Employees Group By Country, Gender UNION ALL Select Country, NULL, Sum(Salary) as TotalSalary From Employees Group By Country UNION ALL Select NULL, Gender, Sum(Salary) as TotalSalary From Employees Group By Gender Finally we also want the grand total of Salary. In this case we are not grouping on any particular column. So both Country and Gender columns will be NULL in the resultset. To achieve this we will have to combine the fourth query using UNION ALL as shown below. Select Country, Gender, Sum(Salary) as TotalSalary From Employees Group By Country, Gender UNION ALL Select Country, NULL, Sum(Salary) as TotalSalary From Employees Group By Country UNION ALL Select NULL, Gender, Sum(Salary) as TotalSalary From Employees Group By Gender UNION ALL Select NULL, NULL, Sum(Salary) as TotalSalary From Employees There are 2 problems with the above approach. The query is huge as we have combined different Group By queries using UNION ALL operator. This can grow even more if we start to add more groups The Employees table has to be accessed 4 times, once for every query. If we use Grouping Sets feature introduced in SQL Server 2008, the amount of T-SQL code that you have to write will be greatly reduced. The following Grouping Sets query produce the same result as the above UNION ALL query. Select Country, Gender, Sum(Salary) TotalSalary From Employees Group BY GROUPING SETS ( (Country, Gender), -- Sum of Salary by Country and Gender (Country), -- Sum of Salary by Country (Gender) , -- Sum of Salary by Gender () -- Grand Total ) The order of the rows in the result set is not the same as in the case of UNION ALL query. To control the order use order by as shown below. Select Country, Gender, Sum(Salary) TotalSalary From Employees Group BY GROUPING SETS ( (Country, Gender), -- Sum of Salary by Country and Gender (Country), -- Sum of Salary by Country (Gender) , -- Sum of Salary by Gender () -- Grand Total ) Order By Grouping(Country), Grouping(Gender), Gender Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/grouping-sets-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/grouping-sets-in-sql-server_19.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 46542 kudvenkat
Group By, Group sets, Rollup, Cube
 
10:38
Demonstrating the user of Group by Clause, grouping sets, Rollup and Cube Clause with simple examples
Views: 14362 Adith Naveen
Difference between cube and rollup in SQL Server
 
05:38
difference between cube and rollup in sql server 2008 sql server rollup vs cube difference between cube and rollup in sql server 2005 rollup and cube in sql server 2005 In this video we will discuss the difference between cube and rollup in SQL Server. CUBE generates a result set that shows aggregates for all combinations of values in the selected columns, where as ROLLUP generates a result set that shows aggregates for a hierarchy of values in the selected columns. Let us understand this difference with an example. ROLLUP(Continent, Country, City) produces Sum of Salary for the following hierarchy Continent, Country, City Continent, Country, Continent () CUBE(Continent, Country, City) produces Sum of Salary for all the following column combinations Continent, Country, City Continent, Country, Continent, City Continent Country, City Country, City () SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY ROLLUP(Continent, Country, City) SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY CUBE(Continent, Country, City) You won't see any difference when you use ROLLUP and CUBE on a single column. Both the following queries produces the same output. SELECT Continent, Sum(SaleAmount) AS TotalSales FROM Sales GROUP BY ROLLUP(Continent) -- OR SELECT Continent, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY CUBE(Continent) Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/difference-between-cube-and-rollup-in.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/difference-between-cube-and-rollup-in_24.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 42125 kudvenkat
Using ROLLUP & CUBE  in ORACLE/عربي/ Arabic
 
11:19
Using ROLLUP & CUBE in ORACLE Group By clause you can see all my courses in my channel :) Just subscribe
Views: 976 khaled alkhudari
Difference Between RollUp and Cube in Oracle
 
12:40
cube and rollup in oracle with example difference between rollup and cube in oracle oracle cube tutorial oracle grouping sets oracle rollup grand total subtotal and grand total in oracle
Views: 0 Adam Tech
Урок 4 : GROUP BY , ROLLUP, CUBE, GROUPING SET, GROUPING, GROUPING ID - MS SQL
 
13:41
1. GROUP BY (MAX , MIN , SUM , AVG , COUNT) 2. ROLLUP , CUBE 3. GROUPING , GROUPING_ID , GROUPING SETS 4. HAVING , ORDER BY
Views: 708 FoxLip News
Oracle SQL - #07 Group By estendido - Rollup e Cube
 
04:49
Inscreva-se: https://www.youtube.com/user/fabianoallex?sub_confirmation=1 Veja os demais vídeos da série: http://fabianoallex.blogspot.com.br/2016/02/oracle-sql-comandos-sql-para-oracle.html
Views: 76 Fabiano Arndt
8 - Querying with Transact-SQL - Grouping Sets and Pivoting Data
 
26:32
Octavo vídeo del curso Querying with Transact-SQL de la plataforma MVA de Microsoft, subido con el fin de poder utilizar los subtítulos con traducción automática, para aquellos que aún no se nos da mucho el inglés.
How to use Oracle SQL ROLLUP and CUBE
 
06:12
Learn how the Oracle Database SQL extensions ROLLUP and CUBE provide additional aggregations for your data warehouse data.
Views: 2216 SkillBuilders
Rollup in SQL Server
 
09:01
sql server group by rollup sql server 2008 group by rollup group by with rollup example sql rollup example sql server rollup example sql server 2008 rollup examples rollup clause in sql server rollup function in sql server ROLLUP in SQL Server is used to do aggregate operation on multiple levels in hierarchy. Let us understand Rollup in SQL Server with examples. We will use the following Employees table for the examples in this video. Retrieve Salary by country along with grand total There are several ways to achieve this. The easiest way is by using Rollup with GroupBy. SELECT Country, SUM(Salary) AS TotalSalary FROM Employees GROUP BY ROLLUP(Country) The above query can also be rewritten as shown below SELECT Country, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Country WITH ROLLUP We can also use UNION ALL operator along with GROUP BY SELECT Country, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Country UNION ALL SELECT NULL, SUM(Salary) AS TotalSalary FROM Employees We can also use Grouping Sets to achieve the same result SELECT Country, SUM(Salary) AS TotalSalary FROM Employees GROUP BY GROUPING SETS ( (Country), () ) Let's look at another example. Group Salary by Country and Gender. Also compute the Subtotal for Country level and Grand Total as shown below. Using ROLLUP with GROUP BY SELECT Country, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY ROLLUP(Country, Gender) OR SELECT Country, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Country, Gender WITH ROLLUP Using UNION ALL with GROUP BY SELECT Country, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Country, Gender UNION ALL SELECT Country, NULL, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Country UNION ALL SELECT NULL, NULL, SUM(Salary) AS TotalSalary FROM Employees Using GROUPING SETS SELECT Country, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY GROUPING SETS ( (Country, Gender), (Country), () ) Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/rollup-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/rollup-in-sql-server_20.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 53258 kudvenkat
Grouping Sets
 
17:33
Here Jen and I go over grouping sets the only way we can. I hope you guys enjoy us late at night.
Views: 133 MidnightDBA
Урок 19. SQL advanced. Сложные группировки rollup groop set cube
 
07:18
Группировки roolup и cube rollup и cube специальные групповые опepации oracle используются вместе с группировкой GROUP BY Oracle SQL. учебная среда https://apex.oracle.com/pls/apex/f?p=4550:1:103440124..::::: схема: SQLADV польз: student1 пароль: student1 будут работать (student2/ student2, student3/ student3 .... student11/ student11) меню SQL Workshop , SQL Command или используйте http://sqlfiddle.com/ скрипт бд для загрузки в sqlfiddle http://sqladv.ru/dev/sql.txt урок и задания http://sqladv.ru/dev/sqladv/l19.txt
Group by cube rollup y grouping sets
 
07:32
Veamos el modo de crear un grupo por todas las posibles combinaciones de las columnas seleccionadas y la forma de obtener subtotales y totales por cada grupo de combinación Para ver el PDF completo http://www.bdconsql.com/2018/10/25/group-by-cube-rollup-y-grouping-sets/ Para ser parte de nuestra comunidad en facebook https://www.facebook.com/groups/1600079906954837/
Views: 87 Elena López
SQL SELECT 6 - UNION, ROLLUP & CUBE by Kalman Toth
 
21:05
SQL SELECT 6 is the sixth video of 16 tutorial videos. It presents SELECT with UNION, UNION ALL, ROLLUP & CUBE. SQL Server 2014 Database Design paperback/kindle by Kalman Toth is available on Amazon ( http://goo.gl/gEIrIO ).
Views: 836 SQLUSA
CUBE, ROLLUP in SQL Server
 
04:57
Click here to Subscribe to IT PORT Channel : https://www.youtube.com/channel/UCMjmoppveJ3mwspLKXYbVlg These operators are used with the GROUP BY clause and allow you to create subtotals, grand totals and superset of subtotals The ROLLUP operator is used with the GROUP BY clause. It is used to create subtotals and grand totals for a set of columns. The summarized amounts are created based on the columns passed to the ROLLUP operator The CUBE operators, like the ROLLUP operator produces subtotals and grand totals as well. But unlike the ROLLUP operator it produces subtotals and grand totals for every permutation of the columns provided to the CUBE operator
Views: 382 IT Port
Generating matrix using SQL queries using CUBE, PIVOT and ROLLUP
 
11:34
Generating matrix in SQL is bit tricky, in above lecture you will learn to generate matrix using CUBE and PIVOT, also difference between CUBE and ROLLUP. For downloading script follow link below: http://www.techsapphire.in/index/generating_matrix_using_sql_queries_using_cube_pivot_and_rollup/0-174
Views: 4236 techsapphire
MSSQL Group BY in Cube and rollup - "Groupıng Sets"
 
14:12
Etkili SQL kullanımı ve kodlama şekilleri -
Views: 106 Muhammet Kaya
SQL Tutorial for Beginners Group By, Having , CUBE and ROLLUP
 
12:33
Oracle SQL Group By, Having , CUBE and ROLLUP Grouping Functions SQL Tutorial SQL Tutorial for beginners Oracle SQL Tutorial for beginners
Views: 5849 TechLake
grouping sets
 
15:15
data warehousing, grouping sets olap
Rollup and Cube Clauses in SQL Server | MSSQL Training
 
23:36
** For Online Training Registration: https://goo.gl/r6kJbB ? Call: +91-8179191999 ? Visit Our Website for Classroom Training: https://nareshit.in/sql-server-training/ ? For Online Training: https://nareshit.com/course/sql-server-online-training/ #sqlserver #server #programming #course #Tutorials #Training #Videos -------------------------- ? About NareshIT: "Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA ,Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA,Hyderabad, Chennai and Vijayawada,Bangalore India which provides online training across all the locations -------------------------- ? Our Online Training Features: 1.Training with Real-Time Experts 2.Industry Specific Scenario’s 3.Flexible Timings 4.Soft Copy of Material 5. Share Videos of each and every session. -------------------------- Please write back to us at [email protected]/[email protected] or Call us at USA: +1404-232-9879 or India: +918179191999 ** Check The Below Links** ? For Course Reg: https://goo.gl/r6kJbB ? Subscribe to Our Channel: https://goo.gl/q9ozyG ? Circle us on G+: https://plus.google.com/NareshIT ? Like us on Facebook: https://www.facebook.com/NareshIT ? Follow us on Twitter: https://twitter.com/nareshitech ? Follow us on Linkedin: https://in.linkedin.com/company/naresh-i-technologies ? Follow us on Instagram: https://www.instagram.com/nareshitech/
Views: 9573 Naresh i Technologies
Oracle - SQL - Advanced Grouping
 
07:03
Oracle - SQL - Advanced Grouping Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
Cube in SQL Server
 
07:42
group by cube in sql server 2008 cube group by sql sql server group by cube example sql server cube group by Cube() in SQL Server produces the result set by generating all combinations of columns specified in GROUP BY CUBE(). Let us understand Cube() in SQL Server with examples. Write a query to retrieve Sum of Salary grouped by all combinations of the following 2 columns as well as Grand Total. Country, Gender Using Cube with Group By SELECT Country, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Cube(Country, Gender) --OR SELECT Country, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Country, Gender with Cube The above query is equivalent to the following Grouping Sets query. SELECT Country, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY GROUPING SETS ( (Country, Gender), (Country), (Gender), () ) The above query is equivalent to the following UNION ALL query. While the data in the result set is the same, the ordering is not. Use ORDER BY to control the ordering of rows in the result set. SELECT Country, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Country, Gender UNION ALL SELECT Country, NULL, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Country UNION ALL SELECT NULL, Gender, SUM(Salary) AS TotalSalary FROM Employees GROUP BY Gender UNION ALL SELECT NULL, NULL, SUM(Salary) AS TotalSalary FROM Employees Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/cube-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/cube-in-sql-server_22.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 56450 kudvenkat
07 GROUPING SETS
 
02:43
Views: 93 Moto Nobre
MS SQL #13 (GROUP BY, ROLLUP, CUBE)
 
24:20
Witam Serdecznie w poradniku do Microsoft SQL Server, operujemy na darmowym oprogramowaniu Sql Server 2014 Management Studio.
Views: 1309 Albrecht Xerxes
Grouping function in SQL Server
 
12:49
sql server rollup grouping sql server rollup replace null sql server rollup grouping replace null In this video we will discuss the use of Grouping function in SQL Server. This is continuation to Part 104. Please watch Part 104 from SQL Server tutorial before proceeding. What is Grouping function Grouping(Column) indicates whether the column in a GROUP BY list is aggregated or not. Grouping returns 1 for aggregated or 0 for not aggregated in the result set. The following query returns 1 for aggregated or 0 for not aggregated in the result set SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales, GROUPING(Continent) AS GP_Continent, GROUPING(Country) AS GP_Country, GROUPING(City) AS GP_City FROM Sales GROUP BY ROLLUP(Continent, Country, City) What is the use of Grouping function in real world When a column is aggregated in the result set, the column will have a NULL value. If you want to replace NULL with All then this GROUPING function is very handy. SELECT CASE WHEN GROUPING(Continent) = 1 THEN 'All' ELSE ISNULL(Continent, 'Unknown') END AS Continent, CASE WHEN GROUPING(Country) = 1 THEN 'All' ELSE ISNULL(Country, 'Unknown') END AS Country, CASE WHEN GROUPING(City) = 1 THEN 'All' ELSE ISNULL(City, 'Unknown') END AS City, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY ROLLUP(Continent, Country, City) Can't I use ISNULL function instead as shown below SELECT ISNULL(Continent, 'All') AS Continent, ISNULL(Country, 'All') AS Country, ISNULL(City, 'All') AS City, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY ROLLUP(Continent, Country, City) Well, you can, but only if your data does not contain NULL values. Let me explain what I mean. At the moment the raw data in our Sales has no NULL values. Let's introduce a NULL value in the City column of the row where Id = 1 Update Sales Set City = NULL where Id = 1 Now execute the following query with ISNULL function SELECT ISNULL(Continent, 'All') AS Continent, ISNULL(Country, 'All') AS Country, ISNULL(City, 'All') AS City, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY ROLLUP(Continent, Country, City) Notice that the actuall NULL value in the raw data is also replaced with the word 'All', which is incorrect. Hence the need for Grouping function. Please note : Grouping function can be used with Rollup, Cube and Grouping Sets Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/grouping-function-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/grouping-function-in-sql-server_25.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 36614 kudvenkat
TSQL Rollup and Cube
 
02:24
These have been replaced by Grouping Sets
Views: 110 Ted on MSSQL
ORACLESQL20 - grupowanie z CUBE, ROLLUP, GROUPING SETS
 
03:31
Kod SQL: http://pastebin.com/wqw713rG Zapytania z CUBE, ROLLUP, GROUPING SETS i ich konwersja na zapytania z GROUP BY oraz UNION ALL.
Collaborate 12 - OBIEE + OECB (Oracle Essbase Cube Builder)
 
09:09
http://www.kpipartners.com/video-collaborate-12-obiee-oecb/ - A Perfect Solution in the Making for OBIEE + Essbase Overview How many times have the Essbase / Hyperion users reported issues with respect to performance of the Cubes or Essbase Cubes crashing because of MDX queries fired by the OBIEE server running for ever ? Is there a possible solution for such issue ? Is there a possibility to have a dedicated Essbase cube for OBIEE users ? How can we ensure that the data sums up exactly between the Essbase cube and the datawarehouse ? Here comes a new tool OECB which if properly configured and managed can solve most of such issues. The Speaker will discuss in detail with a demo on how it can be used to achieve such an objective to ensure the Hyperion users dont have any issues with their cube and how we can ensure a perfect drill between the aggegrated cube and the detailed warehourse level data and how all of this can be achieved with OBIEE as the single source of visibility even though you have 2 data sources - Warehouse and the Essbase Cube. Speaker: Abhinav Banerjee | KPI Partners
Views: 1437 kpipartners
Learn Oracle | Using Rollup Function, Cube Function
 
05:50
Pebbles present, Learn Oracle 10g with Step By Step Video Tutorials. Learn Oracle 10g Tutorial series contains the following videos : Learn Oracle - History of Oracle Learn Oracle - What is Oracle - Why do we need Oracle Learn Oracle - What is a Database Learn Oracle - What is Grid Computing Learn Oracle - What is Normalization Learn Oracle - What is ORDBMS Learn Oracle - What is RDBMS Learn Oracle - Alias Names, Concatenation, Distinct Keyword Learn Oracle - Controlling and Managing User Access (Data Control Language) Learn Oracle - Introduction to SQL Learn Oracle - Oracle 10g New Data Types Learn Oracle - How to Alter a Table using SQL Learn Oracle - How to Create a Package in PL SQL Learn Oracle - How to Create a Report in SQL Plus Learn Oracle - How to Create a Table using SQL - Not Null, Unique Key, Primary Key Learn Oracle - How to Create a Table using SQL Learn Oracle - How to Create a Trigger in PL SQL Learn Oracle - How to Delete Data from a Table using SQL Learn Oracle - How to Drop and Truncate a Table using SQL Learn Oracle - How to Insert Data in a Table using SQL Learn Oracle - How to open ISQL Plus for the first time Learn Oracle - How to Open SQL Plus for the First Time Learn Oracle - How to Update a Table using SQL Learn Oracle - How to use Aggregate Functions in SQL Learn Oracle - How to use Functions in PL SQL Learn Oracle - How to use Group By, Having Clause in SQL Learn Oracle - How to Use Joins, Cross Join, Cartesian Product in SQL Learn Oracle - How to use Outer Joins (Left, Right, Full) in SQL Learn Oracle - How to use the Character Functions, Date Functions in SQL Learn Oracle - How to use the Merge Statement in SQL Learn Oracle - How to use the ORDER BY Clause with the Select Statement Learn Oracle - How to use the SELECT Statement Learn Oracle - How to use the Transactional Control Statements in SQL Learn Oracle - How to use PL SQL Learn Oracle - Data Types in PL SQL Learn Oracle - Exception Handling in PL SQL Learn Oracle - PL SQL Conditional Logics Learn Oracle - PL SQL Cursor Types - Explicit Cursor, Implicit Cursor Learn Oracle - PL SQL Loops Learn Oracle - Procedure Creation in PL SQL Learn Oracle - Select Statement with WHERE Cause Learn Oracle - SQL Operators and their Precedence Learn Oracle - Using Case Function, Decode Function in SQL Learn Oracle - Using Logical Operators in the WHERE Clause of the Select Statement Learn Oracle - Using Rollup Function, Cube Function Learn Oracle - Using Set Operators in SQL Learn Oracle - What are the Different SQL Data Types Learn Oracle - What are the different types of Databases Visit Pebbles Official Website - http://www.pebbles.in Subscribe to our Channel – https://www.youtube.com/channel/UCNNjWVsQqaMYccY044vtHJw?sub_confirmation=1 Engage with us on Facebook at https://www.facebook.com/PebblesChennai Please Like, Share, Comment & Subscribe
Views: 574 Pebbles Tutorials
T-SQL 2012: GROUP BY,GROUPING SETS,CUBE,ROLLUP,HAVING
 
02:36
Группировка в transact-sql 2012 Статья с кодом из видео находится на сайте http://snakeproject.ru/
Views: 1449 Mihail Kozlov
GROUPING ID function in SQL Server
 
12:38
grouping_id function in sql server 2008 grouping_id in sql server 2008 example sql server grouping level In this video we will discuss 1. GROUPING_ID function in SQL Server 2. Difference between GROUPING and GROUPING_ID functions 3. Use of GROUPING_ID function GROUPING_ID function computes the level of grouping. Difference between GROUPING and GROUPING_ID Syntax : GROUPING function is used on single column, where as the column list for GROUPING_ID function must match with GROUP BY column list. GROUPING(Col1) GROUPING_ID(Col1, Col2, Col3,...) GROUPING indicates whether the column in a GROUP BY list is aggregated or not. Grouping returns 1 for aggregated or 0 for not aggregated in the result set. GROUPING_ID() function concatenates all the GOUPING() functions, perform the binary to decimal conversion, and returns the equivalent integer. In short GROUPING_ID (A, B, C) = GROUPING(A) + GROUPING(B) + GROUPING(C) Let us understand this with an example. SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales, CAST(GROUPING(Continent) AS NVARCHAR(1)) + CAST(GROUPING(Country) AS NVARCHAR(1)) + CAST(GROUPING(City) AS NVARCHAR(1)) AS Groupings, GROUPING_ID(Continent, Country, City) AS GPID FROM Sales GROUP BY ROLLUP(Continent, Country, City) Row Number 1 : Since the data is not aggregated by any column GROUPING(Continent), GROUPING(Country) and GROUPING(City) return 0 and as result we get a binar string with all ZEROS (000). When this converted to decimal we get 0 which is displayed in GPID column. Row Number 7 : The data is aggregated for Country and City columns, so GROUPING(Country) and GROUPING(City) return 1 where as GROUPING(Continent) return 0. As result we get a binar string (011). When this converted to decimal we get 10 which is displayed in GPID column. Row Number 15 : This is the Grand total row. Notice in this row the data is aggregated by all the 3 columns. Hence all the 3 GROUPING functions return 1. So we get a binary string with all ONES (111). When this converted to decimal we get 7 which is displayed in GPID column. Use of GROUPING_ID function : GROUPING_ID function is very handy if you want to sort and filter by level of grouping. Sorting by level of grouping : SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales, GROUPING_ID(Continent, Country, City) AS GPID FROM Sales GROUP BY ROLLUP(Continent, Country, City) ORDER BY GPID Filter by level of grouping : The following query retrieves only continent level aggregated data SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales, GROUPING_ID(Continent, Country, City) AS GPID FROM Sales GROUP BY ROLLUP(Continent, Country, City) HAVING GROUPING_ID(Continent, Country, City) = 3 Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/groupingid-function-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/groupingid-function-in-sql-server_27.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 30343 kudvenkat
Funções Oracle CUBE e ROLLUP
 
08:58
Aprenda a usar as funções de agrupamento Oracle CUBE e ROLLUP e como utilizar essas funções da forma correta com exemplos práticos. SELECT department_id, SUM (salary) FROM hr.employees WHERE department_id IN (30, 20) GROUP BY department_id; SELECT department_id, SUM (salary) FROM hr.employees WHERE department_id IN (30, 20) GROUP BY rollup(department_id); SELECT job_id, department_id, SUM (salary) FROM hr.employees WHERE department_id IN (30, 20) GROUP BY rollup(job_id, department_id) ORDER BY job_id, department_id; SELECT job_id, department_id, SUM (salary) FROM hr.employees WHERE department_id IN (30, 20) GROUP BY rollup(department_id, job_id) ORDER BY job_id, department_id; SELECT job_id, department_id, SUM (salary) FROM hr.employees WHERE department_id IN (30, 20) GROUP BY cube(department_id, job_id) ORDER BY job_id, department_id; SELECT job_id, department_id, SUM (salary) FROM hr.employees WHERE department_id IN (30, 20) GROUP BY cube(job_id, department_id) ORDER BY job_id, department_id; Acesse nosso site: http://aprendaplsql.com/ Assine o nosso canal: https://www.youtube.com/user/AprendaPLSQL?sub_confirmation=1 Siga no Facebook: https://www.facebook.com/Aprenda.PLSQL/
Views: 1039 Aprenda PL/SQL
Oracle Core, Лекция 3-1
 
01:17:54
Ссылка на файл с презентацией: https://docs.google.com/presentation/d/1SuOAg8hWW0v2I6394Epzj8V6HeqIKc2ePCuxG8vUaPA/edit?usp=sharing (презентация может быть с анимацией) Ссылка на краткий конспект лекции: https://docs.google.com/document/d/1Mool1fZydho51W9F888yUqAVGTa8SaoBdWWVmRZhEdk/edit?usp=sharing 1. История SQL (развитие стандарта) 2. Группы команд SQL: DDL, DML, DCL, TCL 3. Оператор SELECT, его структура 4. Соединения таблиц (JOINS): 4.1 Внутреннее соединение (INNER JOIN) 4.2 Внешнее соединение (OUTER JOIN): левое внешнее соединение (LEFT OUTER JOIN), правое внешнее соединение (RIGHT OUTER JOIN), полное внешнее соединение (FULL OUTER JOIN) 4.3 Декартово произведение (CARTESIAN PRODUCT) 4.4 SELF JOIN 4.5 PARTITIONED OUTER JOIN 4.6 ANTIJOIN 4.7 SEMIJOIN 5. Подзапросы (SUBQUERY) 6. SET операторы: UNION, UNION ALL, MINUS, INTERSECT 7. Группировка: group by clause, group by cube, group by rollup, group by grouping sets 8. Агрегатные функции: MIN, MAX, COUNT, AVG, SUM 9. Условия ANY, ALL, SOME 10. Условие IN 11. Условие LIKE 12. Условие REGEXP_LIKE 13. Условие EXISTS 14. Условие BETWEEN 15. Выражение CASE Oracle Database, БД Oracle, вебинар Oracle, презентация Oracle, урок Oracle, лекция Oracle, обучение Oracle
TSQL Grouping Sets
 
02:57
Description
Views: 130 Ted on MSSQL
The Cube - Oracle Open World 2011 - Larry Ellison Keynote Ramp-Up (Day 3)
 
23:45
The Cube - Oracle Open World 2011 - Larry Ellison Keynote Ramp-Up (Day 3) with John Furrier and Dave Vellante
SQL Totals and Sub totals using ROLLUP (with sample scenario)
 
03:59
Totals and Subtotals using ROLLUP in : -- ORACLE SQL select case when c.customer_name is null then 'TOTAL' else c.customer_name end CUST_NAME ,case when lt.name is null then 'SUB-TOTAL' else lt.name end Loan_Type ,sum(lr.loan_amount) from loan_request lr join customers c on c.customer_id=lr.customer_id join loan_types lt on lt.loan_type_id = lr.loan_type_id group by rollup(c.customer_name,lt.name) --MYSQL select case when c.customer_name is null then 'TOTAL' else c.customer_name end CUST_NAME ,case when lt.name is null then 'SUB-TOTAL' else lt.name end Loan_Type ,sum(lr.loan_amount) from loan_request lr join customers c on c.customer_id=lr.customer_id join loan_types lt on lt.loan_type_id = lr.loan_type_id group by c.customer_name,lt.name with rollup
Views: 530 Data Disc
SQL Server 2008 - Grouping Sets (New Offering)
 
05:26
Full Detailed Article for "Grouping Sets" is available at : http://sqlserver-training.com/grouping-sets-sql-server-2008-video-tutorial Follow us at more Updates at ----------------------------------------- Website : http://sqlserver-training.com/ Twitter : http://twitter.com/dbatag/ Facebook : http://facebook.com/dbatag/ Linked In : http://in.linkedin.com/in/dbatag/ ================================ You can use the GROUPING SETS extension of the GROUP BY clause to specify multiple groupings of data in one query. It generates the same result set that you would obtain by using the UNION ALL clause, but in a more efficient way. You can use GROUPING SETS to simplify complex aggregation queries into one query. Visit the following link for more details and SQL Server Tutorials http://sqlserver-training.com/grouping-sets-sql-server-2008-video-tutorial
Views: 4354 DBATAG
TSQL Grouping Sets
 
04:08
Replaces rollup
Views: 69 Ted on MSSQL

christian dating after death of spouse
when your ex boyfriend is dating someone new
dating after death of husband
dating chat apps for android
okcupid dating site search