filmov
tv
MySQL: GROUP BY
Показать описание
#MySQL #tutorial #course
You can copy and paste all of the following statements if you would like to follow along in this video.
P.S. Make sure you have a customers table if you're linking the foreign key on customer_id.
------------------------------------------------------------
DROP TABLE IF EXISTS transactions;
CREATE TABLE transactions (
transaction_id INT PRIMARY KEY AUTO_INCREMENT,
amount DECIMAL(5, 2),
customer_id INT,
order_date DATE,
FOREIGN KEY (customer_id)
REFERENCES customers(customer_id)
);
INSERT INTO transactions
VALUES (1000, 4.99, 3, "2023-01-01"),
(1001, 2.89, 2, "2023-01-01"),
(1002, 3.38, 3, "2023-01-02"),
(1003, 4.99, 1, "2023-01-02"),
(1004, 1.00, NULL, "2023-01-03"),
(1005, 2.49, 4, "2023-01-03"),
(1006, 5.48, NULL, "2023-01-03");
SELECT * FROM transactions;
------------------------------------------------------------
00:00:00 intro
00:00:16 data for this demo
00:00:00 GROUP BY
00:03:19 HAVING
00:04:36 conclusion
You can copy and paste all of the following statements if you would like to follow along in this video.
P.S. Make sure you have a customers table if you're linking the foreign key on customer_id.
------------------------------------------------------------
DROP TABLE IF EXISTS transactions;
CREATE TABLE transactions (
transaction_id INT PRIMARY KEY AUTO_INCREMENT,
amount DECIMAL(5, 2),
customer_id INT,
order_date DATE,
FOREIGN KEY (customer_id)
REFERENCES customers(customer_id)
);
INSERT INTO transactions
VALUES (1000, 4.99, 3, "2023-01-01"),
(1001, 2.89, 2, "2023-01-01"),
(1002, 3.38, 3, "2023-01-02"),
(1003, 4.99, 1, "2023-01-02"),
(1004, 1.00, NULL, "2023-01-03"),
(1005, 2.49, 4, "2023-01-03"),
(1006, 5.48, NULL, "2023-01-03");
SELECT * FROM transactions;
------------------------------------------------------------
00:00:00 intro
00:00:16 data for this demo
00:00:00 GROUP BY
00:03:19 HAVING
00:04:36 conclusion
MySQL: GROUP BY
Group By + Order By in MySQL | Beginner MySQL Series
Advanced Aggregate Functions in SQL (GROUP BY, HAVING vs. WHERE)
Group, Sort und Aggregation in SQL - SQL 7
GROUP BY Clause (SQL) - Summarize Results into Groups
MySQL: GROUP BY - Einführung mit einfachem Beispiel (deutsch)
Learning MySQL - GROUP BY
Having vs Where in MySQL | Beginner MySQL Series
COMO USAR GROUP BY Y HAVING EN MYSQL?- CLASE #15
Работа с MySQL .Group by, Order by.
SQL Tutorial 7: Group By, Having & ,Order By Clauses in SQL
Group By And Having Clause In SQL | Group By Clause In SQL | SQL Tutorial For Beginners |Simplilearn
Базы данных. MySQL. Select: GROUP, HAVING
MySQL: GROUP BY - Übungen mit Lösungen (deutsch)
Group By Clause in MySQL|| MySQL Tutorial || Code With Neha
GROUP BY & HAVING CLAUSE IN SELECT COMMAMD || SQL COMMANDS || GROUP BY || HAVING || SQL || DBMS
Группировки GROUP BY и HAVING в MySQL
SQL Tutorial Italiano 21 - GROUP BY e HAVING per lavorare su più record
MySQL. 17. Group By
Group By, agrupando colunas na consulta SQL - Curso de SQL - Aula 20
GROUP BY - Curso de SQL com MySQL - Aula 23
Lec-61: SQL Queries and Subqueries (part-3) | Group By clause | Database Management System
2 MySQL - SELECT Abfragen mit GROUP BY und ORDER BY sortieren und gruppieren
MySQL Eğitimi - Ders 23 | SQL GROUP BY Kullanımı
Комментарии