Home
Search results “Sum case sql oracle”
The SUM(CASE WHEN pattern in SQL to compute valued columns
 
05:52
Here we compute columns to get new and repeat revenue using 2 SUM's which aggregate the binary outcome of a case statement. This is a highly useful pattern in SQL and business analytics.
Views: 4450 Jeffrey James
08. Oracle Database Tutorial - SELECT Operators - DECODE, CASE, NVL, NVL2, SUM, COUNT etc
 
21:30
This video tutorial on Oracle database provides detailed information on various operators used in SELECT statements. You can visit Oracle Database related videos here : https://www.youtube.com/watch?v=cDqlT7O8H0Q&list=PLRt-r4QiDOMfMmVU-8145pLcBxIdvAt8f&index=1 Website: http://guru4technoworld.wix.com/technoguru Facebook : https://www.facebook.com/a2zoftech/ Blog: http://dronatechnoworld.blogspot.com
Views: 116 Sandip M
SQL Aggregation queries using Group By, Sum, Count and Having
 
10:01
From SQL Queries Joes 2 Pros (Vol2) ch4.1. Learn up to write aggregated queries.
Views: 177733 Joes2Pros SQL Trainings
The SUM Function (Introduction to Oracle SQL)
 
03:26
Learn how to add values using the SUM function. The full Introduction to Oracle SQL course is available here: https://www.databasestar.com/introduction-to-oracle-sql-course/
Views: 158 Database Star
How to use the Oracle SQL Searched CASE Expression
 
01:13
Learn Oracle SQL searched CASE comparisons. Note that DECODE only supports equality comparisons, but searched CASE supports IN, BETWEEN, LIKE and scalar functions!
Views: 290 SkillBuilders
PL-SQL tutorial 16 - How to calculate sum of sal column
 
07:09
Hello friends today i'm going to explain to you how to calculate total sum of sal column using deptno Oracle database Unbeatable,Unbreakable Platform..
Views: 1974 Oracle World
PL/SQL Tutorial 6 (Oracle): Sum Command
 
02:38
PL/SQL Tutorial 6 (Oracle): Sum Command In this tutorial I show you how to use the sum command in PL/SQL. It's used to sum numbers in your data tables. Source Code: https://github.com/mitchtabian/SQL-tutorials Subscribe to my Blog and YouTube channel to get notifications when new FREE coding tutorials are posted! Blog: http://www.codingwithmitch.com/
Views: 132 CodingWithMitch
SQL With - How to Use the With (CTE) Statement in SQL Server - SQL Training Online
 
06:33
http://www.sqltrainingonline.com SQL With - How to Use the WITH Statement/Common Table Expressions (CTE) in SQL Server - SQL Training Online In this video, I introduce the SQL WITH statement (also known as Common Table Expressions or CTE) and show you the basics of how it is used. The SQL WITH Statement is called Common Table Expressions or CTE for short in SQL Server The SQL WITH statement is used for 2 primary reasons: 1) To move Subqueries to make the SQL easier to read. 2) To do recursive queries in SQL Today, I just want to talk about the subquery piece. I first want to take a look at the Employee table in the SQL Training Online Simple Database. select * from employee To talk about the SQL WITH statement, I have to first talk about and show you a subquery. select * from ( select * from employee ) a So that is an example of a subquery. But, we want to talk about the SQL WITH, which allows you to move the subquery up and make the SQL a lot easier to read. Here is the same query using the WITH statement. WITH cteEmployee (employee_number,employee_name,manager) AS ( select employee_number,employee_name,manager from employee ) select * from cteEmployee You can see that we start with the WITH clause and then we can use any name we want to name our CTE. In this case, I use "cteEmployee". Then we need to specify the columns inside of parenthesis. Next comes the AS clause. And finally, we just SELECT from the cteEmployee table we created. And, that's it. But, I want to take it a step further and join the cteEmployee CTE back to the Employee table and get the Manager's name. Here is an example of that. WITH cteEmployee (employee_number,employee_name,manager) AS ( select employee_number,employee_name,manager from employee ) select cte.employee_number ,cte.employee_name ,cte.manager ,e.employee_name as manager_name from cteEmployee cte INNER JOIN employee e on cte.manager = e.employee_number That's it. That is the basic introduction into the SQL WITH statement in SQL Server. Microsoft also has some good examples on this. Let me know what you think by commenting or sharing on twitter, facebook, google+, etc. If you enjoy the video, please give it a like, comment, or subscribe to my channel. You can visit me at any of the following: SQL Training Online: http://www.sqltrainingonline.com Twitter: http://www.twitter.com/sql_by_joey Google+: https://plus.google.com/#100925239624117719658/posts LinkedIn: http://www.linkedin.com/in/joeyblue Facebook: http://www.facebook.com/sqltrainingonline
Views: 22692 Joey Blue
SQL SUM
 
13:47
SQL SUM TAKE MY COURSES - CREATE YOUR OWN https://www.greatercommons.com/ JOIN ME, CONNECT, & FOLLOW https://twitter.com/todd_mcleod https://plus.google.com/+ToddMcLeod https://www.linkedin.com/in/tamcleod https://www.instagram.com/tuddleymcleod https://www.youtube.com/c/ToddMcLeod-personal http://www.youtube.com/c/GreaterCommons THINGS I LIKE https://goo.gl/uNb5QJ
Views: 32 Learn To Code
12a of 15 SQL Basics with Oracle - Variations for the COUNT() function
 
04:12
This video looks at three variations of the COUNT() function: COUNT(*), COUNT(field_name) and COUNT(DISTINCT field_name). The examples in the video show what the differences are in the result set for each COUNT variation. (12a of 15)
Views: 1507 Jennifer Kreie
"Sum" - Case(Homi Block) ft. Mel
 
03:27
"Sum"(bonus track) off the "Hard Times" album by Case(27st Homi Block). Photography done by Blaze(One Shot Photos, Familiar Films)
Views: 336 blaze08105
Oracle SQL, PL/SQL, Select Kullanımı ve Eğitimi 2 - Select, min, max, sum, count, avg, having
 
05:57
Oracle SQL, PL/SQL, Select Kullanımı ve Eğitimi 2 -Select, min, max, sum, count, avg, having, oracle select statement, oracle select education, PL/SQL Select, min, max, sum, count, avg, having, PL/SQL Beğendiyseniz Beğen Butonuna basmayı ve Abone olarak destek olmayı unutmayın.
Views: 237 Taner TOPCU
Oracle Sql SELECT statement & Drl command ,where clause, Arithmetic Expressions
 
14:46
SQL Where clause with example on Oracle 11g Database -Oracle Sql Arabic Course Basic SELECT statement & Arithmetic Expressions اوراكل ديفيلوبر SQL tutorial 49: CASE - Simple Case Expression in Oracle Database The WHERE Clause: Case Sensitivity and Collations ORACLE 11g Course Details - Using TOAD (Tool For Oracle Application Development) in training ... Clause; Comparison and conditional operations; Arithmetic and logical operations ... Using group by and having clause of DRL statement ... Understanding the practical approach to sub queries/nested select/sub select/inner ... SQL Editor commands Oracle 12C /Oracle12C-Wilson.asp About SQL&SQL*PLUS; Constraints; Normalization and De-Normalization; ER Diagrams ... Working with DML, DRL Commands; Operators Support. DML-Insert, update, delete; DQL-SELECT Statements using WHERE clause; Comparison and Conditional Operators; Arithmetic and Logical Operators; Set Operators (UNION, ... [PDF]Oracle SQL(Structured Query Language) www.isashitsolution.com/pdf/ORACLE.pdf. Oracle. SQL(Structured Query Language) ... Working with DML, DRL Commands. • Operators Support. Build In Function. • Arithmetic Functions, Character Functions, ... Grouping the Result of a Query. • Using Group by and Having Clause of DRL. Statement ... Using VIEWS for DML Operations. SQL select statement and functions - Nov 20, 2013 - SQL Statements ... SQL as the standard language Oracle SQL complies with ... SQL Statements DRL - Retrieves data from the database DML ... If any column value in an arithmetic expression is null, the result is null. .... The DUAL table is generally used for SELECT clause syntax ... [PDF]SQL Basics & PL-SQL - SQL School sqlschool.com/downloads/PLSQL-Training-SQLSchool.pdf SQL Basics & Oracle PL/SQL Developer Training. All Our Training ... COMMANDS. ✓ Structured Query Language (SQL) Basics ... Returning into clause, Bulk Collect. ✓ For All ... Recycle Bin, Regular Expressions in PLSQL ... DML Command DRL Commands Operators. ✓ INSERT ... Arithmetic and Logical Operators. Operators in SQL.... - PL/SQL-Developer plsql/2011/10/operators-in-sql.html Oct 26, 2011 - If we select the data using select statement from dual ... Arithmetic Operators are used to perform arithmetic operations on numeric ... This is the syntax for using the IN operator. ... Unlike In condition where we will match selective multiple values, we will match .... SQL Statements Part3 (DRL,TCL and DCL). learn oracle - Curly Brackets learn-oracle/ Oracle Pre Defined Data types; DDL Commands; Create, Alter (add, modify, rename, ... Arithmetic Functions, Character Functions, Date Functions, Conversion ... a Query. Using Group by and Having Clause of DRL Statement; Using Order by clause ... Understanding the practical approach to Sub Queries/Nested Select/Sub ... Oracle PL-SQL - SequelGate oracle-plsql-training.html Arithmetic Functions; Character Functions; Date functions; Conversion Functions ... Using Group by and Having Clause of DRL Statement; Using Order by clause ... CASE expression of Select Command, Temporary Tables/Global Tables; New ... : DRL, DDL, DML, TCL and DCL commands /2014/12/drl-ddl-dml-tcl-and-dcl-commands.html DRL, DDL, DML, TCL and DCL commands. DRL (Data Retrieval Language):. Select. DDL (Data Definition Language):. Create. Alter. Drop. Truncate. Missing: expressions SQL Count - Wikitechy https://www.wikitechy.com/tutorials/sql/sql-count Tags : sql tutorial , pl sql tutorial , mysql tutorial , oracle tutorial , learn sql , sql server tutorial. Syntax ... expression can be a column name, an arithmetic operation, or a star . ... In addition to the COUNT function in the SELECT statement. In those cases, these columns need to be part of the GROUP BY clause as well
Views: 50 Muo sigma classes
SQL 063 Scalar Functions, CASE WHEN ELSE or IF THEN ELSE?
 
02:50
Explains the CASE WHEN ELSE Statement Scalar Function in place of IF THEN ELSE. From http://ComputerBasedTrainingInc.com SQL Course. Learn by doing SQL commands for ANSI Standard SQL, Access, DB2, MySQL, Oracle, PostgreSQL, and SQL Server.
Views: 3967 cbtinc
Oracle Interview questions, How to calculate sum of salary without using sum function.
 
06:04
Oracle Interview questions, How to calculate sum of salary without using sum function...!!!!!
Views: 56 ORA CLE
Tutorial#53  Count and Sum  Aggregate Function in Oracle SQL Database| Group by Function in SQL
 
09:01
Explaining How to get Count and Sum Value in Oracle Database in others words what is the aggregate function in Oracle or what are the types of aggregate function in SQL An Aggregate function is a function where the values of multiple rows are grouped together to form a single value of more significant meaning or measurements such as a set, a bag or a list or Aggregate Function in Oracle SQL Database or Aggregate Function in SQL or How to use Count and sum Aggregate Function in Oracle or Types of Aggregate function in SQL Assignment: Assignment link will be available soon: SQL basics, create table oracle, SQL functions, SQL queries, SQL server, SQL developer installation, Oracle database installation, SQL Statement, OCA, Data Types, Types of data types, SQL Logical Operator, SQL Function,Join- Inner Join, Outer join, right outer join, left outer join, full outer join, self-join, cross join, View, SubQuery, Set Operator. Follow me on: Facebook Page: https://www.facebook.com/LrnWthr-319371861902642/?ref=bookmarks Contacts Email: [email protected] Instagram: https://www.instagram.com/equalconnect/ Twitter: https://twitter.com/LrnWthR
Views: 27 EqualConnect Coach
How to sum value in Oracle SQL
 
02:25
How to sum value in Oracle SQL
Views: 72 Tanmun
SQL, Sum, coalesce function, lesson 21
 
05:28
sum and coalesce function
Views: 4894 hammadshams
SQL Server Interview Question: How to find sum of Positive numbers and Negative numbers in a column
 
04:11
SQL Server Interview Question: How to find sum of Positive numbers and Negative numbers in a column
Java prog#104. Take sum (addition) of  all row-values of one column from sql in java netbeans
 
09:47
------------------Online Courses to learn---------------------------- Java - https://bit.ly/2H6wqXk C++ - https://bit.ly/2q8VWl1 AngularJS - https://bit.ly/2qebsLu Python - https://bit.ly/2Eq0VSt C- https://bit.ly/2HfZ6L8 Android - https://bit.ly/2qaRSAS Linux - https://bit.ly/2IwOuqz AWS Certified Solutions Architect - https://bit.ly/2JrGoAF Modern React with Redux - https://bit.ly/2H6wDtA MySQL - https://bit.ly/2qcF63Z ----------------------Follow--------------------------------------------- My Website - http://www.codebind.com My Blog - https://goo.gl/Nd2pFn My Facebook Page - https://goo.gl/eLp2cQ Google+ - https://goo.gl/lvC5FX Twitter - https://twitter.com/ProgrammingKnow Pinterest - https://goo.gl/kCInUp Text Case Converter - https://goo.gl/pVpcwL -------------------------Stuff I use to make videos ------------------- Stuff I use to make videos Windows notebook – http://amzn.to/2zcXPyF Apple MacBook Pro – http://amzn.to/2BTJBZ7 Ubuntu notebook - https://amzn.to/2GE4giY Desktop - http://amzn.to/2zct252 Microphone – http://amzn.to/2zcYbW1 notebook mouse – http://amzn.to/2BVs4Q3 ------------------Facebook Links ---------------------------------------- http://fb.me/ProgrammingKnowledgeLearning/ http://fb.me/AndroidTutorialsForBeginners http://fb.me/Programmingknowledge http://fb.me/CppProgrammingLanguage http://fb.me/JavaTutorialsAndCode http://fb.me/SQLiteTutorial http://fb.me/UbuntuLinuxTutorials http://fb.me/EasyOnlineConverter How to Sum Each Column Values in sql sum - SQL - Add up all row-values of one column How to get the Sum of all column values Add all values from different rows Getting the Number of Rows in a Database Table SQL SUM() Function
Views: 30415 ProgrammingKnowledge
How to Join 3 tables in 1 SQL query
 
04:59
Get your first month on the Joes 2 Pros Academy for just $1 with code YOUTUBE1. Visit http://www.joes2pros.com Offer expires July 1, 2015 From the newly released 2 Disc DVD set (SQL Queries Joes 2 Pros Vol2) this video shows how to join 3 tables in 1 query.
Views: 259636 Joes2Pros SQL Trainings
Case Statement in SQL Server
 
02:22
This video demonstrates how case statement can be used for various conditions to get a value for a column in table in sql server database.
Views: 2041 Gautam Mokal
sql case when
 
10:26
sql case when Help us caption & translate this video! http://amara.org/v/Fozn/
Views: 148 David Jung
Oracle 11g: Group Functions Oracle | Multisoft Virtual Academy
 
13:28
This sample video familiarizes you with group functions used in Oracle®. Functions covered include AVG, COUNT, MAX, MIN, SUM, STDDEV, and VARIANCE. This video is a teaser from an actual training, where you learn concepts more elaborately. Moreover, the training is conducted by an experienced trainer and comprises varied topics helping you to prepare for the related exam easily. To learn more about Oracle® 11g, visit: http://www.multisoftvirtualacademy.com/
3 Tips for Working with PLSQL in Oracle SQL Developer
 
06:33
See very quickly how to click to object declarations, test/execute SQL, and use the code outline in Oracle SQL Developer when working with PL/SQl.
Views: 1508 Jeff Smith
Sql Server  Using Case Expressions
 
05:14
4. Using Case Expressions
Views: 369 Eagle
Oracle SQL Developer Tutorial For Beginners   85   Find the Total Number of Rows
 
00:52
Oracle SQL Developer Tutorial For Beginners Series. This course introduces Oracle SQL Development for its subscribers. Currently this is based on Oracle 12c. The test environment is in Windows 10.
Views: 659 Sam Dhanasekaran
SQL in Oracle 11g Tutorial #11: Aggregate Function(MAX,MIN,SUM,AVG,STDDEV,VARIANCE) in SQL
 
03:31
SQL in Oracle 11g Tutorial #11: Aggregate Function(MAX,MIN,SUM,AVG,STDDEV,VARIANCE) in SQL. Thanks for Watching my Channel “Learn TechToTech”. Please subscribe my channel for getting first updates after uploading video.Social Media pages of Channel are: 1. My Website : www.learnfromrakesh.com 2. My Twitter: https://twitter.com/LearnTechtotech 3. Facebook Page: https://www.facebook.com/LearnTechToTech 4. Blogger : https://learntechtotech.blogspot.in/ 5. Google+ : https://learntechtotech.blogspot.in/ 6. Pinterest : https://in.pinterest.com/LearnTechToTech/ 7. LinkedIn: https://www.linkedin.com/in/Learntechtotech/ Playlist of Different Technology: 1. Operating System : https://goo.gl/q6SfrW 2. Python Programming Language : https://goo.gl/L8b5dc 3. C Language : https://goo.gl/SwvDu9 4. C language for Placement: https://goo.gl/AaQBa4 5. Java: https://goo.gl/M8F2uy 6. MySql : https://goo.gl/vdJbHQ 7. Android Mobile Application Development: https://goo.gl/M6woaT 8. Kotlin Programming Language : https://goo.gl/GXE5cd 9. Go Programming: https://goo.gl/Ua3xYW 10. Internet of Things(IoT): https://goo.gl/f2afkY 11. Oracle 11g : https://goo.gl/zds8r2 12. C++ : https://goo.gl/C1psMT
Views: 83 Learn TechToTech
Oracle Tutorial - How to handle Lower, Upper and Mixed case in SQL Queries
 
05:31
In this video we will see how to handle character fields where we use mixed cases, lower, upper or combination of both. How to effectively query the data as well.
Views: 21 Ganesh Anbarasu
Program to" Input A & B and Calculate the SUM " | Study Tech Edu
 
04:43
Please watch: "Swaping of two Integers "Without Using third variable" in C Language | Study Tech" https://www.youtube.com/watch?v=b94uIVHkfe0 --~-- PL /SQL Program ("To Add two numbers | Input by USER")
Views: 63 Study Tech
SQL Server Case on Select Queries with Else Command DB
 
02:18
MS SQL Server Case on Select Tables Queries Database with Else Command Line DB.
Views: 42 Saidah Faulia
MSSQL -  How to sum each column values
 
00:44
More Info http://howtodomssqlcsharpexcelaccess.blogspot.ca/2017/10/mssql-how-to-sum-each-column-values.html
Views: 485 Vis Dotnet
Lesson 9 - Query Filtering & Operator Precedence (Oracle SQL Certification)
 
19:55
Take the Complete Course at: www.jobreadyprogrammer.com Achieve the Master Programmer Certification! In this lesson we cover query filtering conditions & operator precedence
Views: 3704 Imtiaz Ahmad
DBMS | Database Management System | MySQL | Case Statements | Examples
 
03:10
DBMS My SQL Case Statement -Command -Practical Videos By Edupedia World (www.edupediaworld.com) Online free education For More Videos On DBMS Follow Our Playlist https://www.youtube.com/playlist?list=PLJumA3phskPGizTWslOuX0sQFTQOzkEy7 All Rights Reserved
Views: 70 Edupedia World
Oracle Partition By clause, Oracle Analytic Functions tutorial
 
09:09
More about analytic functions, visit http://www.learn-with-video-tutorials.com Oracle Analytic Functions and Over By Partition clause enable calculating cumulative and moving aggregates returning multiple rows for each group.
Oracle Clauses(distinct,having,group by,order by,from) and avg(),sum(),count
 
01:07:04
Oracle Clauses(distinct,having,group by,order by,from) and avg(),sum(),count
Views: 31 Manohar Sambaa
SQL Server - Query Table Record Data via TSQL - SELECT CASE STATEMENT
 
03:49
How to use the CASE statement. This tutorial covers how to use the case statement logic to alter the appearance of specific query result return values.
Views: 1081 Dave Merton
Oracle SQL Developer: Query Builder Demo
 
08:13
How to build queries with your mouse versus the keyboard. 2018 Update: If you'd like to see how to convert your Oracle style JOINS to ANSI style (in the FROM vs the WHERE clause) see this post https://www.thatjeffsmith.com/archive/2018/10/query-builder-on-inline-views-and-ansi-joins/
Views: 76240 Jeff Smith
Amazon Interview Questions - 1 | GeeksforGeeks
 
10:59
Find complete Interview Experience at GeeksforGeeks Article: http://www.geeksforgeeks.org/amazon-interview-experience-set-360-campus/ Vertical Sum in a Binary Tree: Solution: 1) Hashing based: http://www.geeksforgeeks.org/vertical-sum-in-a-given-binary-tree/ 2) Space optimised: http://www.geeksforgeeks.org/vertical-sum-in-binary-tree-set-space-optimized/ Practice Problem Online Judge: http://practice.geeksforgeeks.org/problems/vertical-sum/1 Maximum Width of a Binary Tree: Solution: http://www.geeksforgeeks.org/maximum-width-of-a-binary-tree/ Practice Problem Online Judge: http://practice.geeksforgeeks.org/problems/maximum-width-of-tree/1 Video: https://www.youtube.com/watch?v=tRH8RS99wPk How is map implemented in C++ STL? http://practice.geeksforgeeks.org/problems/how-is-map-implemented-in-c-stl/ Priority Inheritance and Priority Inversion: http://www.geeksforgeeks.org/whats-difference-priority-inversion-priority-inheritance/ Topological Sort: http://www.geeksforgeeks.org/topological-sorting/ Memory Layout: http://www.geeksforgeeks.org/memory-layout-of-c-program/ More Amazon Interview Questions and Preparation Material: http://www.geeksforgeeks.org/amazon-interview-preparation/ Images Designed by Freepik Soundtrack: Take You Home Tonight by Vibe Tracks This video is contributed by Ishant Periwal Please Like, Comment and Share the Video among your friends. Also, Subscribe if you haven't already! :)
Views: 259512 GeeksforGeeks
SQL Tutorial - Show Totals with GROUP BY using OVER
 
07:40
Another video brought to you by BeardedDev, bringing you tutorials on Business Intelligence, SQL Programming and Data Analysis. You can now support me on patreon - https://www.patreon.com/beardeddev In this SQL Tutorial we look at how we can use OVER to show totals of a query that involves GROUP BY. We start by explaining the issue, when using GROUP BY in a query we cannot show totals as we cannot perform an aggregate function on top of an aggregate function, this will cause SQL Server to display an error. How we can get round this is to call upon our friend Window Functions, by using the OVER clause we can then generate a total as this operates on the SELECT stage. Please see the SQL Code used in this tutorial below: SELECT Sales_Customer_Id , SUM(Sales_Amount) AS Cust_Total , SUM(SUM(Sales_Amount)) OVER(ORDER BY (SELECT NULL)) AS Grand_Total , AVG(SUM(Sales_Amount)) OVER(ORDER BY (SELECT NULL)) AS Average_Cust_Total , CAST((SUM(Sales_Amount) / SUM(SUM(Sales_Amount)) OVER(ORDER BY (SELECT NULL))) * 100 AS DECIMAL(6,2)) AS Pct FROM dbo.Sales GROUP BY Sales_Customer_Id
Views: 378 BeardedDev
SQL LEC 17 CASE,DECODE
 
11:09
SQL by sir farooq
Views: 25 Idrees Saqib
MySQL SUM IF
 
02:31
In most spread sheet applications like excel or google docs, you have the ability to SUM only certain rows in a column IF they meet certain criteria. Well with a mysql database, it's like a complicated spreadsheet, so we should be able to do the same thing. Here we learn how to combine a mysql SUM function with a mysql IF statement to achieve this.
Views: 7557 optikalefx
14. T-SQL - Functions COUNT MAX MIN SUM AVG
 
05:15
We have learnt some of the aggregate functions which SQL provide. This include COUNT, MAX, MIN, SUM and AVG.
Views: 334 Farrukh Saeed
ORACLE SQL 16  AVG, SUM, MIN, MAX   YouTube
 
05:41
Chào các bạn, Blog StudyAndShare được xây dựng với mục đích chia sẻ kiến thức giữa cộng động những người yêu thích Công Nghệ Thông Tin Việt Nam. Nó hoàn toàn miễn phí với tất cả mọi người. Hi vọng Blog sẽ có ích cho công việc và học tập của các bạn. Channel https://www.youtube.com/user/studyandshare2012 sẽ là kênh chính thức của Blog từ 2012. Để xem thêm các tài liệu cũng như chia sẻ kiến thức và ý kiến xây dựng Blog, các bạn có thể gửi về các địa chỉ dưới đây: Blog: http://studyandshare.wordpress.com/ Facebook Group: http://www.facebook.com/groups/studyandsharevn/ Email: [email protected] Cảm ơn tất cả các bạn. Vì một Việt Nam tươi đẹp! Nhóm Blog Study And Share.
Views: 556 Study And Share
Oracel SQL -  Running Sum or Running Total and Percent of Total
 
04:57
Running Sum or Running Total : syntax sum([measure_column]) over (order by [dimension_column] now running sum is displayed for each employee if we need restart the running sum by Gender here running sum is calculated separately for M and F Total salary to F = 250000 Total salary to M = 130000 What happens if we don't add order by? total 250000 for each gender is displayed at all rows if we want to display the total sum of salary at each row total sum(salary) is displayed at each row ----- Using this value we can calculate % of total select emp_name,gender,salary, sum(salary) over (order by emp_id)as Running_sum, round((salary/sum(salary) over())*100,2) as Perc_of_Total from employee
Views: 153 Data Disc
Sum of first N Numbers | Logical Programming in C | by Mr.Srinivas
 
04:55
Sum of first N Numbers | Logical Programming in C | by Mr.Srinivas ** For Online Training Registration: https://goo.gl/r6kJbB ► Call: +91-8179191999 Subscribe to our channel and hit the bell 🔔🔔🔔 icon to get video updates. 💡 Visit Our Websites For Classroom Training: https://nareshit.in For Online Training: https://nareshit.com -------------------------- 💡 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: 🎈 Training with Real-Time Experts 🎈 Industry Specific Scenario’s 🎈 Flexible Timings 🎈 Soft Copy of Material 🎈 Share Videos of each and every session. -------------------------- 💡 Please write back to us at 📧 [email protected]/ 📧 [email protected] or Call us at the 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/nareshitek ► Follow us on Linkedin: https://goo.gl/CRBZ5F ► Follow us on Instagram: https://goo.gl/3UXYK3
Views: 1236 Naresh i Technologies
Difference between where and having in sql server
 
06:36
sql server where vs having sql server group by where having group by having sql server In this vide we will discuss the difference between where and having caluses in sql server. Let us understand the difference with an example. To calculate total sales by product, we would write a GROUP BY query as shown below SELECT Product, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY Product Now if we want to find only those products where the total sales amount is greater than $1000, we will use HAVING clause to filter products SELECT Product, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY Product HAVING SUM(SaleAmount) ] 1000 If we use WHERE clause instead of HAVING clause, we will get a syntax error. This is because the WHERE clause doesn’t work with aggregate functions like sum, min, max, avg, etc. SELECT Product, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY Product WHERE SUM(SaleAmount) ] 1000 So in short, the difference is WHERE clause cannot be used with aggregates where as HAVING can. However, there are other differences as well that we need to keep in mind when using WHERE and HAVING clauses. WHERE clause filters rows before aggregate calculations are performed where as HAVING clause filters rows after aggregate calculations are performed. Let us understand this with an example. Total sales of iPhone and Speakers can be calculated by using either WHERE or HAVING clause Calculate Total sales of iPhone and Speakers using WHERE clause : In this example the WHERE clause retrieves only iPhone and Speaker products and then performs the sum. SELECT Product, SUM(SaleAmount) AS TotalSales FROM Sales WHERE Product in ('iPhone', 'Speakers') GROUP BY Product Calculate Total sales of iPhone and Speakers using HAVING clause : This example retrieves all rows from Sales table, performs the sum and then removes all products except iPhone and Speakers. SELECT Product, SUM(SaleAmount) AS TotalSales FROM Sales GROUP BY Product HAVING Product in ('iPhone', 'Speakers') So from a performance standpoint, HAVING is slower than WHERE and should be avoided when possible. Another difference is WHERE comes before GROUP BY and HAVING comes after GROUP BY. Difference between WHERE and Having 1. WHERE clause cannot be used with aggregates where as HAVING can. This means WHERE clause is used for filtering individual rows where as HAVING clause is used to filter groups. 2. WHERE comes before GROUP BY. This means WHERE clause filters rows before aggregate calculations are performed. HAVING comes after GROUP BY. This means HAVING clause filters rows after aggregate calculations are performed. So from a performance standpoint, HAVING is slower than WHERE and should be avoided when possible. 3. WHERE and HAVING can be used together in a SELECT query. In this case WHERE clause is applied first to filter individual rows. The rows are then grouped and aggregate calculations are performed, and then the HAVING clause filters the groups. Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/difference-between-where-and-having-in.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/difference-between-where-and-having-in_15.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 Full SQL Server Course https://www.youtube.com/playlist?list=PL4cyC4G0M1RQ_Rm52cQ4CcOJ_T_HXeMB4 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: 71417 kudvenkat