Giới thiệu trại hè Data Analysis - Nghề Analysis - Cài đặt MySQL 8x LTS
01 - FREE Data Analyst Bootcamp!!
https://youtu.be/rGx1QNdYzvs?si=GsBGmnl7kQQGPwm2
02 - How to Become a Data Analyst in 2023 (Completely FREE!)
https://youtu.be/CUBfrdDwznQ?si=VzH9pCA7RKxtjQr3
03 - Installing MySQL and Creating Databases
https://youtu.be/wgRwITQHszU?si=L4vzUHBKzZmfJr5M
01:15
link download MySQL:
https://dev.mysql.com/downloads/installer/
LTS - Long Time Support
Vào Microsoft Store cài cũng tương tự (có thể thiếu workbench)
+ chọn No, thanks...
+ Excute chứ không Next (cẩn thận cài thiếu)
+ chọn cài FULL
+ Cài Visual C++ (auto)
https://www.techspot.com/downloads/6776-visual-c-redistributable-package.html
+ Trong tab Navigator - Chọn Schemas
+ Chạy đoạn code này để tạo data (03 tables)
09:45
Right click lên table - Select Row limit to 1000 (thử đổi lại 10 rồi chạy lại câu query)
10:45
Thử chạy thêm table salary ở dưới chung với dòng cũ -> test nút chạy từng dòng (Ctrl + ENTER)
DROP DATABASE IF EXISTS `Parks_and_Recreation`;
CREATE DATABASE `Parks_and_Recreation`;
USE `Parks_and_Recreation`;
CREATE TABLE employee_demographics (
employee_id INT NOT NULL,
first_name VARCHAR(50),
last_name VARCHAR(50),
age INT,
gender VARCHAR(10),
birth_date DATE,
PRIMARY KEY (employee_id)
);
CREATE TABLE employee_salary (
employee_id INT NOT NULL,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
occupation VARCHAR(50),
salary INT,
dept_id INT
);
INSERT INTO employee_demographics (employee_id, first_name, last_name, age, gender, birth_date)
VALUES
(1,'Leslie', 'Knope', 44, 'Female','1979-09-25'),
(3,'Tom', 'Haverford', 36, 'Male', '1987-03-04'),
(4, 'April', 'Ludgate', 29, 'Female', '1994-03-27'),
(5, 'Jerry', 'Gergich', 61, 'Male', '1962-08-28'),
(6, 'Donna', 'Meagle', 46, 'Female', '1977-07-30'),
(7, 'Ann', 'Perkins', 35, 'Female', '1988-12-01'),
(8, 'Chris', 'Traeger', 43, 'Male', '1980-11-11'),
(9, 'Ben', 'Wyatt', 38, 'Male', '1985-07-26'),
(10, 'Andy', 'Dwyer', 34, 'Male', '1989-03-25'),
(11, 'Mark', 'Brendanawicz', 40, 'Male', '1983-06-14'),
(12, 'Craig', 'Middlebrooks', 37, 'Male', '1986-07-27');
INSERT INTO employee_salary (employee_id, first_name, last_name, occupation, salary, dept_id)
VALUES
(1, 'Leslie', 'Knope', 'Deputy Director of Parks and Recreation', 75000,1),
(2, 'Ron', 'Swanson', 'Director of Parks and Recreation', 70000,1),
(3, 'Tom', 'Haverford', 'Entrepreneur', 50000,1),
(4, 'April', 'Ludgate', 'Assistant to the Director of Parks and Recreation', 25000,1),
(5, 'Jerry', 'Gergich', 'Office Manager', 50000,1),
(6, 'Donna', 'Meagle', 'Office Manager', 60000,1),
(7, 'Ann', 'Perkins', 'Nurse', 55000,4),
(8, 'Chris', 'Traeger', 'City Manager', 90000,3),
(9, 'Ben', 'Wyatt', 'State Auditor', 70000,6),
(10, 'Andy', 'Dwyer', 'Shoe Shiner and Musician', 20000, NULL),
(11, 'Mark', 'Brendanawicz', 'City Planner', 57000, 3),
(12, 'Craig', 'Middlebrooks', 'Parks Director', 65000,1);
CREATE TABLE parks_departments (
department_id INT NOT NULL AUTO_INCREMENT,
department_name varchar(50) NOT NULL,
PRIMARY KEY (department_id)
);
INSERT INTO parks_departments (department_name)
VALUES
('Parks and Recreation'),
('Animal Control'),
('Public Works'),
('Healthcare'),
('Library'),
('Finance');
Nhận xét
Đăng nhận xét