Lec-80: How Aggregate Functions work on NULL Values | SQL | DBMS

Опубликовано: 23 Июль 2026
на канале: Gate Smashers
129,840
2.8k

🔹 Gate Smashers Shorts:
Watch quick concepts & short videos here:
   / @gatesmashersshorts  

🔹 Subscribe for more shorts and motivational content:
   / @varunainashots  

If an aggregate function against a column that contains nulls is executed, the function ignores the nulls. This prevents unknown or inapplicable values from affecting the result of the aggregate.

CODE:
Step1: Create table t1 ( A int, B int);
Step2: Insert into t1 values(1,null);
Insert into t1 values(2,null);
Insert into t1 values(3, null);
Insert into t1 values(4,null);
Insert into t1 values(null,null);
Step3: Select count(*) from t1;
Select count(A) from t1;
Select count(B) from t1;

►Database Management System(Complete Playlist):
   • DBMS (Database Management system) Complete...  

Other subject-wise playlist Links:
--------------------------------------------------------------------------------------------------------------------------------------
►Design and Analysis of algorithms (DAA):
   • Design and Analysis of algorithms (DAA)  
►Computer Architecture (Complete Playlist):
   • Computer Organization and Architecture (Co...  
► Theory of Computation
   • TOC(Theory of Computation)  
►Artificial Intelligence:
   • Artificial Intelligence (Complete Playlist)  
►Computer Networks (Complete Playlist):
   • Computer Networks (Complete Playlist)  
►Operating System:
   • Operating System (Complete Playlist)  
►Structured Query Language (SQL):
   • Structured Query Language (SQL)  
►Discrete Mathematics:
   • Discrete Mathematics  
►Compiler Design:
   • Compiler Design (Complete Playlist)  
►Number System:
   • Number system  
►Cloud Computing & BIG Data:
   • Cloud Computing (Complete Course)  
►Software Engineering:
   • Software Engineering  
►Data Structure:
   • Data Structure  
►Graph Theory:
   • Graph Theory  
►Programming in C:
   • C Programming  
►Digital Logic:
   • Digital Logic (Complete Playlist)  

---------------------------------------------------------------------------------------------------------------------------------------
Our social media Links:
► Subscribe to us on YouTube:    / gatesmashers  
►Subscribe to our new channel:    / @varunainashots  
► Like our page on Facebook:   / gatesmashers  
► Follow us on Instagram:   / gate.smashers  
► Follow us on Instagram:   / varunainashots  
► Follow us on Telegram: https://t.me/gatesmashersofficial
► Follow us on Threads: https://www.threads.net/@gate.smashers
--------------------------------------------------------------------------------------------------------------------------------------
►For Any Query, Suggestion or notes contribution:
Email us at: [email protected]