MySQL + SQL · Lesson 55

MySQL में Aggregate Functions

Aggregate Functions क्या हैं?

Aggregate functions कई rows पर काम करके एक summary value लौटाते हैं — जैसे total या average।

पाँच Functions

Functionलौटाता है
COUNT()rows की संख्या
SUM()total
AVG()average
MAX()सबसे ज़्यादा
MIN()सबसे कम

Examples

SELECT COUNT(*) FROM students;
SELECT SUM(marks) FROM students;
SELECT AVG(marks) FROM students;
SELECT MAX(marks), MIN(marks) FROM students;
हर query पूरी table के लिए एक summary number लौटाती है।

सारांश

  • Aggregate functions कई rows को एक value में summarise करते हैं।
  • COUNT, SUM, AVG, MAX, MIN।
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

💻 लाइव कोड एडिटर

इस पेज के प्रोग्राम यहीं तैयार हैं — चलाएँ, बदलें और सीखें। कुछ भी इंस्टॉल किए बिना।
OneCompiler द्वारा संचालित। कोड एडिटर में अपने आप आ जाता है — Run दबाकर आउटपुट देखें। अगर एडिटर न खुले तो नए टैब में खोलें.