ข้ามไปยังเนื้อหา
รายงาน: การ join พร้อมการ grouping

พลังที่แท้จริงมาจากการรวมสิ่งที่คุณเรียนรู้: join ตารางสองตาราง, group แถวที่ join แล้ว และ สรุป แต่ละกลุ่มด้วยฟังก์ชัน aggregate

A common report is "how much has each customer spent?" — join customers to their orders, group by customer, and SUM the totals.

หลังจาก join, GROUP BY สร้างบรรทัดสรุปหนึ่งบรรทัดต่อกลุ่ม

เอกสารประกอบการเรียน

เข้าสู่ระบบหรือสร้างบัญชี

IGCSE, A-Level & AP