├── 1 - SQL Beginner to Guru MySQL Edition Introduction ├── 4 - Exclusive Slack Group │ └── Private Slack Channel Exclusive to this Course.docx ├── 5 - SQL - Let_s write our first SQL! │ ├── AssignmentCreatePersonTable.pdf │ └── gettingstartedwithsql.txt └── 6 - SQL Fiddle Assignment Review │ └── example.sql ├── 10 - Using SQL to Delete Data ├── 3 - Example of the SQL DELETE Statement │ └── examples.sql ├── 4 - Assignment - Create, Update, and Delete an Employee record │ └── AssnCRUDEmployeeRec.pdf └── 5 - Assignment Review - Create, Update, and Delete an Employee record │ └── examples.sql ├── 11 - Using SQL Transactions ├── 2 - Introduction to SQL Transactions │ └── OverviewOfSQLTransactions.pdf ├── 3 - Demonstration of Database Transactions │ └── examples.sql ├── 4 - Assignment - Create Employee Using SQL Transactions │ └── AssnCreateEmpWithTrans.pdf ├── 5 - Assignment Review - Create Employee Using SQL Transactions │ └── examples.sql ├── 7 - User Defined Variables in MySQL │ └── examples.sql └── 8 - Demonstration of Lost SQL Updates │ ├── examples.sql │ └── source_links.txt ├── 12 - Advanced SQL Reporting ├── 10 - Assignment - Create Monthly Profit Report by Item │ ├── AssnCreateMonthlyProfitReportByItem.pdf │ └── Thumbs.db ├── 11 - Assignment Review - Create Monthly Profit Report by Item │ └── example.sql ├── 12 - Assignment - Create a Weekly Sales Report by Employee │ ├── AssnCreateWeeklySalesReportByEmployee.pdf │ └── Thumbs.db ├── 13 - Assignment Review - Create a Weekly Sales Report by Employee │ └── examples.sql ├── 14 - Weekly Sales Report by Employee Revisited │ └── examples.sql ├── 3 - Assignment - Create Orders View │ ├── AssnCreateOrdersView.pdf │ └── Thumbs.db ├── 4 - Assignment Review - Create Orders View │ └── examples.sql ├── 5 - Materialized Views in MySQL │ ├── MaterializedViews.pdf │ └── Thumbs.db ├── 7 - Assignment Review - Create Orders Report │ └── examples.sql ├── 8 - Assignment - Monthly Sales Report by State │ ├── AssnCreateMonthlySalesRptByState.pdf │ └── Thumbs.db └── 9 - Assignment Review - Monthly Sales Report by State │ └── examples.sql ├── 13 - Introduction to DDL SQL Views ├── 3 - Assignment - Create Orders View │ ├── AssnCreateOrdersView.pdf │ └── Thumbs.db ├── 4 - Assignment Review - Create Orders View │ └── examples.sql └── 5 - Materialized Views in MySQL │ ├── MaterializedViews.pdf │ └── Thumbs.db ├── 14 - Using SQL to Create Tables ├── 1 - Introduction │ └── Coming Soon!.docx ├── 10 - SQL Create Table with Indexes │ └── exaples.sql ├── 12 - Assignment - SQL Create Table │ ├── AssnCreateTable.pdf │ └── Thumbs.db ├── 13 - Assignment Review - SQL Create Table │ └── examples.sql ├── 14 - Conclusion │ └── Coming Soon!.docx ├── 3 - Creating a Table with SQL Select │ └── examples.sql ├── 4 - SQL Truncate Table Command │ ├── Thumbs.db │ └── TruncateTableComand.pdf ├── 5 - SQL Drop Table Command │ └── examples.sql ├── 6 - SQL Create Table Example │ └── examples.sql ├── 7 - SQL Create Table Example with Primary Key │ └── examples.sql ├── 8 -SQL Create Table with Auto-Increment Primary Key │ └── examples.sql └── 9 - SQL Create Table with Foreign Keys │ └── examples.sql ├── 15 - Using SQL to Update Tables ├── 1 - Introduction │ └── Coming Soon!.docx ├── 2 - Introduction to the SQL Alter Table Command │ └── examples.sql ├── 3 - Using SQL Alter Table Command to Add and Remove a Column │ └── example.sql ├── 4 - Using SQL Alter Table to Reorder Columns │ └── examples.sql ├── 5 - Using SQL Alter Table Command to Add or Remove an Index │ └── examples.sql ├── 6 - Using SQL Alter Table Command to Add or Remove a FK Constraint │ └── examples.sql ├── 7 - Assignment - Add ASIN, UPC, and EAN to Book Table │ └── AssnAddASINandUPC.pdf ├── 8 - Assignment Review - Add ASIN, UPC, and EAN to Book Table │ └── examples.sql └── 9 - Using SQL Alter Table for MySQL Generated Columns │ └── examples.sql ├── 2 - Introduction to SQL ├── 1 - Introduction to SQL │ ├── 2 1 IntroductionMySQL.srt │ └── 2 1 IntroductionMySQL.vtt ├── 10 - FlashCards │ └── MySQL Flashcard.pdf ├── 2 - What is a Database_ │ └── WhatIsADatabase.pdf ├── 3 - Relational Database Principles │ └── RelationalDatabasePrinciples.pdf ├── 4 - Assignment_ Create Tables and Insert Data │ └── 2.4AssnCreateTablesInsertData.pdf ├── 5 - Assignment Review_ Create Tables and Insert Data │ ├── examples.sql │ └── source_links.txt ├── 6 - History of SQL │ └── HistoryOfSQL.pdf ├── 7 - What is a Relational Database Management System_ │ └── WhatIsaRDBMS.pdf ├── 8 - History of MySQL │ └── HIstoryOfMySQL.pdf └── 9 - RDBMS Deployment Architectures │ └── RDBMSDeploymentArchtectures.pdf ├── 3 - Installation of MySQL ├── 2 - Review of MySQL Installation Options │ └── MySQLInstallationOptions.pdf ├── 3 - MySQL Windows Quick Start │ └── MySQL Editions.docx ├── 4 - MySQL Windows 10 Installation │ └── source_links.txt ├── 5 - MySQL OSX Quick Start │ └── MySQL OSX Installation.docx ├── 6 - MySQL OSX Installation │ └── source_links.txt ├── 7 - MySQL Linux Installation Quick Start │ └── MySQL Ubuntu Installation.docx └── 9 - MySQL Linux Installation CentOS │ └── source_links.txt ├── 4 - Connecting to MySQL ├── 10 - MySQL Workbench Linux Installation Quick Start │ └── MySQL Workbench Linux Installation Quick Start.docx ├── 11 - MySQL Workbench Linux Installation │ └── Coming Soon!.docx ├── 2 - Connecting to MySQL Overview │ └── ConnectingToMySQLOverview.pdf ├── 3 - MySQL Command Line for Windows 10 │ └── Coming Soon.docx ├── 6 - MySQL Workbench Windows Installation Quick Start │ └── MySQL Workbench Windows Installation Quick Start.docx ├── 7 - MySQL Workbench Windows Installation │ └── Coming Soon!.docx └── 8 - MySQL Workbench OSX Installation Quick Start │ └── MySQL Workbench OSX Installation Quick Start.docx ├── 5 - Selecting Data from a Single Table ├── 10 - SQL Arithmetic Operators │ └── SQLArithemticOperators.pdf ├── 11 - Using SQL Arithmetic Operators in Selecting Data │ └── examples.sql ├── 12 - SQL Data Types │ └── MySQLDataTypes.pdf ├── 13 - Formatting Date Values with MySQL │ ├── MySQLFormatingDates.pdf │ └── example.sql ├── 14 - Using the LEFT and RIGHT MySQL Functions │ └── examples.sql ├── 15 - Quiz │ └── Quiz.pdf ├── 16 - Introduction to the SQL WHERE Clause │ └── IntroductionToWhereClause.pdf ├── 17 - SQL WHERE Clause with Equals and Not Equals │ └── examples.sql ├── 18 - Using AND and OR with SQL WHERE Clause │ └── examples.sql ├── 19 - Using IN and NOT IN with with SQL WHERE Clause │ └── examples.sql ├── 2 - Importing the MySQL Employee Database │ └── examples.sql ├── 20 - Dealing with NULL Values in SQL WHERE Clause │ └── examples.sql ├── 21 - Using Greater Than and Less Than with SQL WHERE Clause │ └── examples.sql ├── 22 - Using LIKE and NOT LIKE with SQL WHERE Clause │ └── examples.sql ├── 23 - Using BETWEEN and NOT BETWEEN with SQL WHERE Clause │ └── examples.sql ├── 24 - Ordering Results with SQL ORDER BY │ └── examples.sql ├── 25 - Limit Results with SQL LIMIT Clause │ └── examples.sql ├── 26 - Using SQL to Select DISTINCT Values │ └── examples.sql ├── 27 - Using SQL Sub-selects with IN in SQL Where Clause │ └── examples.sql ├── 28 - Assignment - Fix SQL Statements │ └── sqlstatementstofix.sql ├── 29 - Assignment Review │ ├── fixedSQLStatements.sql │ └── sqlstatementstofix.sql ├── 3 - Assignment_ Get Counts of Each Table │ └── AssignmentGetRowCounts.pdf ├── 4 - Quiz │ └── Quiz.pdf ├── 5 - Assignment Review_ Get Counts of Each Table │ └── examples.sql ├── 7 - Selecting Specific Columns from Tables │ └── examples.sql ├── 8 - Using Aliases to Name Columns │ └── examples.sql └── 9 - Using the SQL CONCAT Function to Join Columns │ └── examples.sql ├── 6 - Grouping and Summarizing Data with SQL ├── 2 - Using the SQL GROUP By clause │ └── examples.sql ├── 3 - MySQL Aggregate Functions │ ├── MySQLAggreateFunctiosn.pdf │ └── Thumbs.db ├── 4 - Using the SQL HAVING Clause │ └── examples.sql └── 5 - Using the SQL SUM Function │ └── examples.sql ├── 7 - Using SQL to Select Data from More Than One Table ├── 10 - Using SQL Equi-Joins │ └── examples.sql ├── 11 - Using SQL Union Joins │ └── examples.sql ├── 12 - Other MySQL Functions │ └── OtherMySQLFunctions.pdf ├── 13 - Using SQL LEFT OUTER JOINS │ └── examples.sql ├── 14 - Assignment - Write SQL LEFT OUTER JOIN │ └── AssnWriteOuterJoin.pdf ├── 2 - Overview of SQL Table Joins │ └── OverviewOfSQLJoins.pdf ├── 3 - Introduction to SQL Inner Joins │ └── examples.sql ├── 4 - Using Table Aliases with SQL Inner Joins │ └── examples.sql ├── 5 - Limiting Columns Displayed with SQL Inner Joins │ └── examples.sql ├── 6 - Using a WHERE Clause with SQL Inner Joins │ └── examples.sql ├── 7 - Assignment - Create Department Employee Report │ └── SQLAssignemtnEmployeeReport.pdf ├── 8 - Assignment Review - Create Department Employee Report │ └── example.sql └── 9 - Using SQL Natural Joins │ └── example.sql ├── 8 - Using SQL to Insert Data ├── 10 - Assignment Review - Use SQL Inserts to create a new Employee │ └── examples.sql ├── 3 - Example SQL Insert Statement │ └── examples.sql ├── 4 - Specifying Columns in SQL Inserts │ └── examples.sql ├── 5 - Assignment - Use SQL to create a record in DEPARTMENTS table │ └── AssignmentInsertIntoDepartmentsTable.pdf ├── 6 - Assignment Review - Use SQL to create a record in DEPARTMENTS table │ └── examples.sql ├── 7 - Using a SQL Sub-select with SQL Insert Statements │ └── eamples.sql └── 9 - Assignment - Use SQL Inserts to create a new Employee │ └── AssUseSQLInsertsCreateEmp.pdf ├── 9 - Using SQL to Update Data ├── 3 - Example SQL Update Statement │ └── examples.sql ├── 4 - Assignment - Use SQL Update Statement to Change Employee Name │ └── AssnUpdateEmployeeRecord.pdf ├── 5 - Assignment Review - Use SQL Update Statement to Change Employee Name │ └── examples.sql ├── 6 - Assignment - Using SQL Update and Insert to Create a New Salary Record │ └── AssnUpdateCreateSalaryRec.pdf └── 9 - Assignment - Re-import the employee database │ ├── AssnReImportEmpDatabase.pdf │ └── source_links.txt ├── LICENSE └── README.md /1 - SQL Beginner to Guru MySQL Edition Introduction/4 - Exclusive Slack Group/Private Slack Channel Exclusive to this Course.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/1 - SQL Beginner to Guru MySQL Edition Introduction/4 - Exclusive Slack Group/Private Slack Channel Exclusive to this Course.docx -------------------------------------------------------------------------------- /1 - SQL Beginner to Guru MySQL Edition Introduction/5 - SQL - Let_s write our first SQL!/AssignmentCreatePersonTable.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/1 - SQL Beginner to Guru MySQL Edition Introduction/5 - SQL - Let_s write our first SQL!/AssignmentCreatePersonTable.pdf -------------------------------------------------------------------------------- /1 - SQL Beginner to Guru MySQL Edition Introduction/5 - SQL - Let_s write our first SQL!/gettingstartedwithsql.txt: -------------------------------------------------------------------------------- 1 | CREATE TABLE tasks ( 2 | task_name VARCHAR(255), 3 | complete BOOLEAN ); 4 | 5 | INSERT INTO tasks VALUES ('Study SQL', false); 6 | 7 | SELECT * FROM tasks; 8 | 9 | -------------------------------------------------------------------------------- /1 - SQL Beginner to Guru MySQL Edition Introduction/6 - SQL Fiddle Assignment Review/example.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE persons ( 2 | first_name VARCHAR(255), 3 | last_name VARCHAR(255) 4 | ); 5 | 6 | INSERT INTO persons VALUES ('John', 'Thompson'); 7 | 8 | SELECT concat(first_name, ' ', last_name) as full_name from persons; -------------------------------------------------------------------------------- /10 - Using SQL to Delete Data/3 - Example of the SQL DELETE Statement/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from departments; 4 | 5 | insert into departments values ('d999', 'foo'); 6 | 7 | delete from departments where dept_no = 'd999'; 8 | 9 | 10 | -- Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 11 | delete from departments; 12 | 13 | -- wont work 14 | delete from departments where dept_no like '%'; 15 | 16 | delete from departments where dept_no like 'd%'; 17 | 18 | 19 | -- view table information 20 | SELECT cols.TABLE_NAME, cols.COLUMN_NAME, cols.ORDINAL_POSITION, 21 | cols.COLUMN_DEFAULT, cols.IS_NULLABLE, cols.DATA_TYPE, 22 | cols.CHARACTER_MAXIMUM_LENGTH, cols.CHARACTER_OCTET_LENGTH, 23 | cols.NUMERIC_PRECISION, cols.NUMERIC_SCALE, 24 | cols.COLUMN_TYPE, cols.COLUMN_KEY, cols.EXTRA, 25 | cols.COLUMN_COMMENT, refs.REFERENCED_TABLE_NAME, refs.REFERENCED_COLUMN_NAME, 26 | cRefs.UPDATE_RULE, cRefs.DELETE_RULE, 27 | links.TABLE_NAME, links.COLUMN_NAME, 28 | cLinks.UPDATE_RULE, cLinks.DELETE_RULE 29 | FROM INFORMATION_SCHEMA.`COLUMNS` as cols 30 | LEFT JOIN INFORMATION_SCHEMA.`KEY_COLUMN_USAGE` AS refs 31 | ON refs.TABLE_SCHEMA=cols.TABLE_SCHEMA 32 | AND refs.REFERENCED_TABLE_SCHEMA=cols.TABLE_SCHEMA 33 | AND refs.TABLE_NAME=cols.TABLE_NAME 34 | AND refs.COLUMN_NAME=cols.COLUMN_NAME 35 | LEFT JOIN INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS cRefs 36 | ON cRefs.CONSTRAINT_SCHEMA=cols.TABLE_SCHEMA 37 | AND cRefs.CONSTRAINT_NAME=refs.CONSTRAINT_NAME 38 | LEFT JOIN INFORMATION_SCHEMA.`KEY_COLUMN_USAGE` AS links 39 | ON links.TABLE_SCHEMA=cols.TABLE_SCHEMA 40 | AND links.REFERENCED_TABLE_SCHEMA=cols.TABLE_SCHEMA 41 | AND links.REFERENCED_TABLE_NAME=cols.TABLE_NAME 42 | AND links.REFERENCED_COLUMN_NAME=cols.COLUMN_NAME 43 | LEFT JOIN INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS cLinks 44 | ON cLinks.CONSTRAINT_SCHEMA=cols.TABLE_SCHEMA 45 | AND cLinks.CONSTRAINT_NAME=links.CONSTRAINT_NAME 46 | WHERE cols.TABLE_SCHEMA=DATABASE() 47 | AND cols.TABLE_NAME="employees"; 48 | 49 | -- use with caution, will clear whole database 50 | delete from employees where emp_no > 1; -------------------------------------------------------------------------------- /10 - Using SQL to Delete Data/4 - Assignment - Create, Update, and Delete an Employee record/AssnCRUDEmployeeRec.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/10 - Using SQL to Delete Data/4 - Assignment - Create, Update, and Delete an Employee record/AssnCRUDEmployeeRec.pdf -------------------------------------------------------------------------------- /10 - Using SQL to Delete Data/5 - Assignment Review - Create, Update, and Delete an Employee record/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from employees; 4 | 5 | INSERT INTO employees SELECT max(emp_no) + 1, '1976-02-02', 'Micheal', 'Weston', 'M', '2015-01-02' FROM employees; 6 | 7 | SELECT * from employees where last_name = 'Weston'; 8 | 9 | UPDATE employees 10 | SET birth_date = '1976-03-02' 11 | WHERE emp_no = 500000; 12 | 13 | DELETE FROM employees 14 | WHERE emp_no = 500000; -------------------------------------------------------------------------------- /11 - Using SQL Transactions/2 - Introduction to SQL Transactions/OverviewOfSQLTransactions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/11 - Using SQL Transactions/2 - Introduction to SQL Transactions/OverviewOfSQLTransactions.pdf -------------------------------------------------------------------------------- /11 - Using SQL Transactions/3 - Demonstration of Database Transactions/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from employees; 4 | 5 | begin; 6 | 7 | INSERT INTO employees SELECT max(emp_no) + 1, '1976-02-02', 'Micheal', 'Weston', 'M', '2015-01-02' FROM employees; 8 | 9 | commit; 10 | 11 | SELECT * from employees where last_name = 'Weston'; 12 | 13 | commit; 14 | 15 | UPDATE employees 16 | SET birth_date = '1976-03-02' 17 | WHERE emp_no = 500000; 18 | 19 | DELETE FROM employees 20 | WHERE emp_no = 500000; 21 | 22 | 23 | rollback; 24 | 25 | -- turn off 26 | set autocommit=0; 27 | 28 | -- turn on 29 | set autocommit=1; 30 | -------------------------------------------------------------------------------- /11 - Using SQL Transactions/4 - Assignment - Create Employee Using SQL Transactions/AssnCreateEmpWithTrans.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/11 - Using SQL Transactions/4 - Assignment - Create Employee Using SQL Transactions/AssnCreateEmpWithTrans.pdf -------------------------------------------------------------------------------- /11 - Using SQL Transactions/5 - Assignment Review - Create Employee Using SQL Transactions/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- create employee record 4 | -- create title record 5 | -- create employee department record 6 | -- create employee salary record 7 | 8 | begin; 9 | 10 | INSERT INTO employees SELECT max(emp_no) + 1, '1985-01-01', 'Jessie', 'Porter', 'M', '2018-01-01' FROM employees; 11 | 12 | INSERT INTO titles SELECT max(emp_no), 'Staff', '2018-01-01', '9999-01-01'FROM employees; 13 | 14 | INSERT INTO dept_emp SELECT max(emp_no), 'd008', '2018-01-01', '9999-01-01'FROM employees; 15 | 16 | INSERT INTO salaries SELECT max(emp_no), 120000, '2018-01-01', '9999-01-01' FROM employees; 17 | 18 | commit; 19 | 20 | 21 | SELECT * from employees where first_name = 'Jessie' and last_name = 'Porter'; -------------------------------------------------------------------------------- /11 - Using SQL Transactions/7 - User Defined Variables in MySQL/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- create employee record 4 | -- create title record 5 | -- create employee department record 6 | -- create employee salary record 7 | 8 | SET @foo = 'bar'; 9 | 10 | SELECT @foo; 11 | 12 | begin; 13 | 14 | SELECT (@employee_no:=(max(emp_no) + 1)) from employees; 15 | 16 | INSERT INTO employees values (@employee_no, '1985-01-01', 'Sam', 'Axe', 'M', '2018-01-01'); 17 | 18 | INSERT INTO titles VALUES (@employee_no, 'Staff', '2018-01-01', '9999-01-01'); 19 | 20 | INSERT INTO dept_emp VALUES (@employee_no, 'd008', '2018-01-01', '9999-01-01'); 21 | 22 | INSERT INTO salaries VALUES (@employee_no, 120000, '2018-01-01', '9999-01-01'); 23 | 24 | commit; 25 | 26 | select * from salaries where emp_no = @employee_no; 27 | 28 | select * from employees where emp_no = @employee_no; -------------------------------------------------------------------------------- /11 - Using SQL Transactions/8 - Demonstration of Lost SQL Updates/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- client a 4 | 5 | select * from salaries where emp_no = 500000; 6 | 7 | begin; 8 | 9 | update salaries 10 | set salary = salary + 19 11 | where emp_no = 500000; 12 | 13 | commit; 14 | 15 | -- client b 16 | SELECT * from employees where first_name = 'Jessie' and last_name = 'Porter'; 17 | 18 | select * from salaries where emp_no = 500000; 19 | 20 | select (@jessieSal:=salary) from salaries where emp_no = 500000; 21 | 22 | update salaries 23 | set salary = @jessieSal + 3 24 | where emp_no = 500000; 25 | 26 | 27 | -------------------------------------------------------------------------------- /11 - Using SQL Transactions/8 - Demonstration of Lost SQL Updates/source_links.txt: -------------------------------------------------------------------------------- 1 | Lost Updates Blog Post: https://www.morpheusdata.com/blog/2015-02-21-lost-update-db 2 | 3 | -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/10 - Assignment - Create Monthly Profit Report by Item/AssnCreateMonthlyProfitReportByItem.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/10 - Assignment - Create Monthly Profit Report by Item/AssnCreateMonthlyProfitReportByItem.pdf -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/10 - Assignment - Create Monthly Profit Report by Item/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/10 - Assignment - Create Monthly Profit Report by Item/Thumbs.db -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/11 - Assignment Review - Create Monthly Profit Report by Item/example.sql: -------------------------------------------------------------------------------- 1 | use northwind; 2 | -- Create report by year, by month, by item 3 | -- Show total sales, cost, and profit List Price * order quantity - standard cost * order quantity 4 | -- Limit to order lines invoiced 5 | -- Use Equi-Join Syntax for table joins 6 | 7 | SELECT 8 | DATE_FORMAT(ord.order_date, '%Y - %m') AS 'Order Month', 9 | p.product_code AS 'Product Code', 10 | p.product_name AS 'Description', 11 | CONCAT('$', 12 | FORMAT(SUM(quantity * p.list_price), 2)) AS 'Sales', 13 | CONCAT('$', 14 | FORMAT(SUM(odt.quantity * p.standard_cost), 15 | 2)) AS 'Cost', 16 | CONCAT('$', 17 | FORMAT(SUM((p.list_price - p.standard_cost) * odt.quantity), 18 | 2)) AS 'Profit' 19 | FROM 20 | orders AS ord, 21 | order_details AS odt, 22 | products AS p 23 | WHERE 24 | ord.id = odt.order_id 25 | AND odt.product_id = p.id 26 | GROUP BY DATE_FORMAT(ord.order_date, '%Y - %m') , p.product_code 27 | ORDER BY DATE_FORMAT(ord.order_date, '%Y - %m') , SUM((p.list_price - p.standard_cost) * odt.quantity) DESC; 28 | -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/12 - Assignment - Create a Weekly Sales Report by Employee/AssnCreateWeeklySalesReportByEmployee.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/12 - Assignment - Create a Weekly Sales Report by Employee/AssnCreateWeeklySalesReportByEmployee.pdf -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/12 - Assignment - Create a Weekly Sales Report by Employee/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/12 - Assignment - Create a Weekly Sales Report by Employee/Thumbs.db -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/13 - Assignment Review - Create a Weekly Sales Report by Employee/examples.sql: -------------------------------------------------------------------------------- 1 | use northwind; 2 | -- Create a Weekly Sales Report per Employee 3 | -- Report should list each employee and show zero if the employee had no sales 4 | -- Should be values for each week company had sales 5 | -- Use outer joins 6 | -- Use ifnull function to provide zero values 7 | -- Hint - you will need to use a subquery for order data 8 | 9 | 10 | select first_name, last_name, week, format(ifnull(sales, 0), 2) as total_sales from employees 11 | left outer join 12 | (select week(order_date) as week, employee_id, sum(shipping_fee + (quantity * list_price)) as sales 13 | from orders, order_details, products 14 | where orders.id = order_details.order_id 15 | and order_details.product_id = products.id 16 | group by 1, 2 ) as order_data on 17 | employees.id = order_data.employee_id 18 | order by 3, 2; 19 | 20 | SELECT 21 | week_id AS 'Week', 22 | last_name AS 'Last Name', 23 | first_name AS 'First Name', 24 | FORMAT(IFNULL(sales, 0), 2) AS 'Total Sales' 25 | FROM 26 | (SELECT 27 | e.id AS employee_id, week_id, last_name, first_name 28 | FROM 29 | employees e 30 | CROSS JOIN (SELECT DISTINCT 31 | (WEEK(order_date)) AS week_id 32 | FROM 33 | orders) AS distict_weeks) AS order_weeks 34 | LEFT OUTER JOIN 35 | (SELECT 36 | employee_id, 37 | WEEK(order_date) AS order_week, 38 | SUM(shipping_fee + (quantity * list_price)) AS sales 39 | FROM 40 | orders, order_details, products 41 | WHERE 42 | orders.id = order_details.order_id 43 | AND order_details.product_id = products.id 44 | GROUP BY 1 , 2) AS order_data ON order_weeks.employee_id = order_data.employee_id 45 | AND order_weeks.week_id = order_data.order_week 46 | ORDER BY 1 , 2; 47 | 48 | 49 | -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/14 - Weekly Sales Report by Employee Revisited/examples.sql: -------------------------------------------------------------------------------- 1 | use northwind; 2 | 3 | SELECT 4 | week_id AS 'Week', 5 | last_name AS 'Last Name', 6 | first_name AS 'First Name', 7 | FORMAT(IFNULL(sales, 0), 2) AS 'Total Sales' 8 | FROM 9 | (SELECT 10 | e.id AS employee_id, week_id, last_name, first_name 11 | FROM 12 | employees e 13 | CROSS JOIN (SELECT DISTINCT 14 | (WEEK(order_date)) AS week_id 15 | FROM 16 | orders) AS distict_weeks) AS order_weeks 17 | LEFT OUTER JOIN 18 | (SELECT 19 | employee_id, 20 | WEEK(order_date) AS order_week, 21 | SUM(shipping_fee + (quantity * list_price)) AS sales 22 | FROM 23 | orders, order_details, products 24 | WHERE 25 | orders.id = order_details.order_id 26 | AND order_details.product_id = products.id 27 | GROUP BY 1 , 2) AS order_data ON order_weeks.employee_id = order_data.employee_id 28 | AND order_weeks.week_id = order_data.order_week 29 | ORDER BY 1 , 2; 30 | 31 | 32 | SELECT 33 | e.id AS employee_id, week_id, last_name, first_name 34 | FROM 35 | employees e 36 | CROSS JOIN 37 | (SELECT DISTINCT 38 | (WEEK(order_date)) AS week_id 39 | FROM 40 | orders) AS distict_weeks; 41 | 42 | 43 | SELECT DISTINCT 44 | (WEEK(order_date)) AS week_id 45 | FROM 46 | orders; 47 | 48 | 49 | SELECT 50 | employee_id, 51 | WEEK(order_date) AS order_week, 52 | SUM(shipping_fee + (quantity * list_price)) AS sales 53 | FROM 54 | orders, 55 | order_details, 56 | products 57 | WHERE 58 | orders.id = order_details.order_id 59 | AND order_details.product_id = products.id 60 | GROUP BY 1 , 2; 61 | 62 | 63 | -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/3 - Assignment - Create Orders View/AssnCreateOrdersView.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/3 - Assignment - Create Orders View/AssnCreateOrdersView.pdf -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/3 - Assignment - Create Orders View/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/3 - Assignment - Create Orders View/Thumbs.db -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/4 - Assignment Review - Create Orders View/examples.sql: -------------------------------------------------------------------------------- 1 | use northwind; 2 | -- Create a view for order data 3 | -- Show: Employee first name, last name, customer first name and last name 4 | -- Show: shipper name, product code, product name, order status name, order detail status name 5 | -- Show Tax Status Name 6 | -- Select Data from View 7 | -- Drop view 8 | 9 | 10 | SELECT 11 | employees.first_name as employee_first_name, employees.last_name as employee_last_name, 12 | customers.first_name as customer_first_name, customers.last_name as customer_last_name, 13 | shippers.company as shipper_name, products.product_code, products.product_name, 14 | orders_status.status_name as order_status, order_details_status.status_name as order_detail_status, 15 | orders_tax_status.tax_status_name 16 | FROM 17 | orders 18 | JOIN 19 | order_details ON orders.id = order_details.id 20 | JOIN 21 | customers ON orders.customer_id = customers.id 22 | JOIN 23 | employees ON orders.employee_id = employees.id 24 | JOIN 25 | products ON order_details.product_id = products.id 26 | JOIN 27 | orders_tax_status ON ifnull(orders.tax_status_id, 1) = orders_tax_status.id 28 | JOIN 29 | orders_status ON orders.status_id = orders_status.id 30 | JOIN 31 | order_details_status ON order_details.status_id = order_details_status.id 32 | JOIN 33 | shippers ON orders.shipper_id = shippers.id; 34 | 35 | 36 | CREATE OR REPLACE VIEW order_data AS 37 | SELECT 38 | employees.first_name as employee_first_name, employees.last_name as employee_last_name, 39 | customers.first_name as customer_first_name, customers.last_name as customer_last_name, 40 | shippers.company as shipper_name, products.product_code, products.product_name, 41 | orders_status.status_name as order_status, order_details_status.status_name as order_detail_status, 42 | orders_tax_status.tax_status_name 43 | FROM 44 | orders 45 | JOIN 46 | order_details ON orders.id = order_details.id 47 | JOIN 48 | customers ON orders.customer_id = customers.id 49 | JOIN 50 | employees ON orders.employee_id = employees.id 51 | JOIN 52 | products ON order_details.product_id = products.id 53 | JOIN 54 | orders_tax_status ON ifnull(orders.tax_status_id, 1) = orders_tax_status.id 55 | JOIN 56 | orders_status ON orders.status_id = orders_status.id 57 | JOIN 58 | order_details_status ON order_details.status_id = order_details_status.id 59 | JOIN 60 | shippers ON orders.shipper_id = shippers.id; 61 | 62 | select * from order_data; 63 | 64 | DROP VIEW order_data; 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/5 - Materialized Views in MySQL/MaterializedViews.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/5 - Materialized Views in MySQL/MaterializedViews.pdf -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/5 - Materialized Views in MySQL/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/5 - Materialized Views in MySQL/Thumbs.db -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/7 - Assignment Review - Create Orders Report/examples.sql: -------------------------------------------------------------------------------- 1 | use northwind; 2 | -- Show Customer First Name, Last Name 3 | -- Shipping Company Name 4 | -- Order Date (formatted as January, 1, 2018), Shipping Address (street, city, state, zip, country) 5 | -- Product Code, Product Name, List Price, quantity ordered, and total cost of line item 6 | -- Provide friendly column names 7 | -- Format numbers to have commas and limit decimals to two places 8 | 9 | SELECT 10 | cust.first_name AS 'First Name', 11 | cust.last_name AS 'Last Name', 12 | ord.ship_address AS 'Street', 13 | ord.ship_city AS 'City', 14 | ord.ship_state_province AS 'State', 15 | ord.ship_zip_postal_code AS 'Zip', 16 | ord.ship_country_region AS 'Country', 17 | shippers.company AS 'Shipper', 18 | DATE_FORMAT(ord.order_date, '%M %D %Y') AS 'Order Date', 19 | products.product_code AS 'Product Code', 20 | products.product_name AS 'Product Name', 21 | FORMAT(ord_det.quantity, 0) AS 'Qty Ordered', 22 | FORMAT(products.standard_cost, 2) AS 'Cost', 23 | FORMAT(ord_det.quantity * products.standard_cost, 24 | 2) AS 'Total Cost' 25 | FROM 26 | orders AS ord 27 | JOIN 28 | order_details AS ord_det ON ord.id = ord_det.order_id 29 | JOIN 30 | customers AS cust ON ord.customer_id = cust.id 31 | JOIN 32 | shippers ON shippers.id = ord.shipper_id 33 | JOIN 34 | products ON ord_det.product_id = products.id; -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/8 - Assignment - Monthly Sales Report by State/AssnCreateMonthlySalesRptByState.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/8 - Assignment - Monthly Sales Report by State/AssnCreateMonthlySalesRptByState.pdf -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/8 - Assignment - Monthly Sales Report by State/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/12 - Advanced SQL Reporting/8 - Assignment - Monthly Sales Report by State/Thumbs.db -------------------------------------------------------------------------------- /12 - Advanced SQL Reporting/9 - Assignment Review - Monthly Sales Report by State/examples.sql: -------------------------------------------------------------------------------- 1 | use northwind; 2 | -- Create Sales Report by year, month, by state 3 | -- Show total revenue - List Price * order quantity 4 | -- Limit to order lines invoiced 5 | 6 | SELECT 7 | DATE_FORMAT(order_date, '%Y - %m') AS 'Sales Month', 8 | ord.ship_state_province as 'State', 9 | CONCAT('$', 10 | FORMAT((odt.quantity * products.list_price), 11 | 2)) AS 'Total Sales' 12 | FROM 13 | orders AS ord 14 | JOIN 15 | order_details odt ON ord.id = odt.order_id 16 | JOIN 17 | products ON odt.product_id = products.id 18 | WHERE 19 | odt.status_id = 2 20 | GROUP BY DATE_FORMAT(order_date, '%Y - %m'), ord.ship_state_province 21 | ORDER BY 'Sales Month' ASC; -------------------------------------------------------------------------------- /13 - Introduction to DDL SQL Views/3 - Assignment - Create Orders View/AssnCreateOrdersView.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/13 - Introduction to DDL SQL Views/3 - Assignment - Create Orders View/AssnCreateOrdersView.pdf -------------------------------------------------------------------------------- /13 - Introduction to DDL SQL Views/3 - Assignment - Create Orders View/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/13 - Introduction to DDL SQL Views/3 - Assignment - Create Orders View/Thumbs.db -------------------------------------------------------------------------------- /13 - Introduction to DDL SQL Views/4 - Assignment Review - Create Orders View/examples.sql: -------------------------------------------------------------------------------- 1 | use northwind; 2 | -- Create a view for order data 3 | -- Show: Employee first name, last name, customer first name and last name 4 | -- Show: shipper name, product code, product name, order status name, order detail status name 5 | -- Show Tax Status Name 6 | -- Select Data from View 7 | -- Drop view 8 | 9 | 10 | SELECT 11 | employees.first_name as employee_first_name, employees.last_name as employee_last_name, 12 | customers.first_name as customer_first_name, customers.last_name as customer_last_name, 13 | shippers.company as shipper_name, products.product_code, products.product_name, 14 | orders_status.status_name as order_status, order_details_status.status_name as order_detail_status, 15 | orders_tax_status.tax_status_name 16 | FROM 17 | orders 18 | JOIN 19 | order_details ON orders.id = order_details.id 20 | JOIN 21 | customers ON orders.customer_id = customers.id 22 | JOIN 23 | employees ON orders.employee_id = employees.id 24 | JOIN 25 | products ON order_details.product_id = products.id 26 | JOIN 27 | orders_tax_status ON ifnull(orders.tax_status_id, 1) = orders_tax_status.id 28 | JOIN 29 | orders_status ON orders.status_id = orders_status.id 30 | JOIN 31 | order_details_status ON order_details.status_id = order_details_status.id 32 | JOIN 33 | shippers ON orders.shipper_id = shippers.id; 34 | 35 | 36 | CREATE OR REPLACE VIEW order_data AS 37 | SELECT 38 | employees.first_name as employee_first_name, employees.last_name as employee_last_name, 39 | customers.first_name as customer_first_name, customers.last_name as customer_last_name, 40 | shippers.company as shipper_name, products.product_code, products.product_name, 41 | orders_status.status_name as order_status, order_details_status.status_name as order_detail_status, 42 | orders_tax_status.tax_status_name 43 | FROM 44 | orders 45 | JOIN 46 | order_details ON orders.id = order_details.id 47 | JOIN 48 | customers ON orders.customer_id = customers.id 49 | JOIN 50 | employees ON orders.employee_id = employees.id 51 | JOIN 52 | products ON order_details.product_id = products.id 53 | JOIN 54 | orders_tax_status ON ifnull(orders.tax_status_id, 1) = orders_tax_status.id 55 | JOIN 56 | orders_status ON orders.status_id = orders_status.id 57 | JOIN 58 | order_details_status ON order_details.status_id = order_details_status.id 59 | JOIN 60 | shippers ON orders.shipper_id = shippers.id; 61 | 62 | select * from order_data; 63 | 64 | DROP VIEW order_data; 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /13 - Introduction to DDL SQL Views/5 - Materialized Views in MySQL/MaterializedViews.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/13 - Introduction to DDL SQL Views/5 - Materialized Views in MySQL/MaterializedViews.pdf -------------------------------------------------------------------------------- /13 - Introduction to DDL SQL Views/5 - Materialized Views in MySQL/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/13 - Introduction to DDL SQL Views/5 - Materialized Views in MySQL/Thumbs.db -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/1 - Introduction/Coming Soon!.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/14 - Using SQL to Create Tables/1 - Introduction/Coming Soon!.docx -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/10 - SQL Create Table with Indexes/exaples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | DROP TABLE IF EXISTS drink_order; 4 | DROP TABLE IF EXISTS customer; 5 | 6 | 7 | CREATE TABLE customer ( 8 | id INTEGER auto_increment, 9 | first_name VARCHAR(100), 10 | last_name VARCHAR(100), 11 | address VARCHAR(100), 12 | city VARCHAR(100), 13 | state VARCHAR(2), 14 | zip_code VARCHAR(10), 15 | PRIMARY KEY (id), 16 | INDEX last_name_idx (last_name ASC) 17 | ); 18 | 19 | CREATE TABLE drink_order ( 20 | id INTEGER auto_increment, 21 | customer_id INTEGER, 22 | drink_description VARCHAR(100), 23 | PRIMARY KEY (id), 24 | CONSTRAINT fk_drink_order_customer 25 | FOREIGN KEY (customer_id) 26 | REFERENCES customer (id) 27 | ); 28 | 29 | insert into customer values (null, 'Michael', 'Weston', '123 Brickel', 'Miami', 'FL', '33123'); 30 | insert into drink_order values (123344, 1, 'Scotch'); 31 | 32 | 33 | select * from customer; 34 | select * from drink_order; -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/12 - Assignment - SQL Create Table/AssnCreateTable.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/14 - Using SQL to Create Tables/12 - Assignment - SQL Create Table/AssnCreateTable.pdf -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/12 - Assignment - SQL Create Table/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/14 - Using SQL to Create Tables/12 - Assignment - SQL Create Table/Thumbs.db -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/13 - Assignment Review - SQL Create Table/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- Create classic - ‘Author’ / ‘Book’ example, where the Author has many books. 4 | -- Don’t worry about multiple authors per book. (applying the K.I.S.S. principle) 5 | -- Author should have the following properties: first name, last name, email, phone, website, date created, date updated. 6 | -- Book should have the following properties: title, subtitle, description, ISBN, price, date created, date updated. 7 | -- Follow best practices - use primary key, auto-increment, proper data types. 8 | -- ISBN is unique and should be enforced. 9 | 10 | DROP TABLE IF EXISTS BOOK; 11 | DROP TABLE IF EXISTS AUTHOR; 12 | 13 | CREATE TABLE author ( 14 | id INTEGER auto_increment, 15 | first_name VARCHAR(50), 16 | last_name VARCHAR(50), 17 | email VARCHAR(256), 18 | phone VARCHAR(15), 19 | website VARCHAR(200), 20 | date_created timestamp, 21 | date_updated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 22 | PRIMARY KEY (id) 23 | ); 24 | 25 | CREATE TABLE book ( 26 | id INTEGER AUTO_INCREMENT, 27 | author_id INTEGER, 28 | title VARCHAR(100), 29 | sub_title VARCHAR(150), 30 | description TEXT, 31 | isbn CHAR(13), 32 | price DECIMAL(9 , 2 ), 33 | date_created TIMESTAMP, 34 | date_updated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, 35 | PRIMARY KEY (id), 36 | UNIQUE KEY (isbn), 37 | CONSTRAINT fk_book_author 38 | FOREIGN KEY (author_id) 39 | REFERENCES author (id) 40 | ); -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/14 - Conclusion/Coming Soon!.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/14 - Using SQL to Create Tables/14 - Conclusion/Coming Soon!.docx -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/3 - Creating a Table with SQL Select/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select count(*) from salaries; 4 | 5 | CREATE TABLE salaries2 as (select * from salaries); 6 | 7 | 8 | -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/4 - SQL Truncate Table Command/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/14 - Using SQL to Create Tables/4 - SQL Truncate Table Command/Thumbs.db -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/4 - SQL Truncate Table Command/TruncateTableComand.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/14 - Using SQL to Create Tables/4 - SQL Truncate Table Command/TruncateTableComand.pdf -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/5 - SQL Drop Table Command/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from salaries2; 4 | 5 | DROP TABLE IF EXISTS salaries2; 6 | 7 | -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/6 - SQL Create Table Example/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | CREATE TABLE persons ( 4 | first_name VARCHAR(255), 5 | last_name VARCHAR(255) 6 | ); 7 | 8 | INSERT INTO persons VALUES ('John', 'Thompson'); 9 | 10 | SELECT concat(first_name, ' ', last_name) as full_name from persons; 11 | 12 | SELECT * from persons; 13 | 14 | CREATE TABLE customer ( 15 | id INTEGER, 16 | first_name VARCHAR(100), 17 | last_name VARCHAR(100), 18 | address VARCHAR(100), 19 | city VARCHAR(100), 20 | state VARCHAR(2), 21 | zip_code VARCHAR(10) 22 | ); 23 | 24 | CREATE TABLE drink_order ( 25 | id INTEGER, 26 | customer_id INTEGER, 27 | drink_description VARCHAR(100) 28 | ); 29 | 30 | insert into customer values (1234, 'Michael', 'Weston', '123 Brickel', 'Miami', 'FL', '33123'); 31 | insert into drink_order values (123344, 1234, 'Scotch'); 32 | 33 | 34 | select * from customer; 35 | select * from drink_order; -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/7 - SQL Create Table Example with Primary Key/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | CREATE TABLE customer ( 4 | id INTEGER, 5 | first_name VARCHAR(100), 6 | last_name VARCHAR(100), 7 | address VARCHAR(100), 8 | city VARCHAR(100), 9 | state VARCHAR(2), 10 | zip_code VARCHAR(10), 11 | PRIMARY KEY (id) 12 | ); 13 | 14 | CREATE TABLE drink_order ( 15 | id INTEGER, 16 | customer_id INTEGER, 17 | drink_description VARCHAR(100), 18 | PRIMARY KEY (id) 19 | ); 20 | 21 | insert into customer values (1234, 'Michael', 'Weston', '123 Brickel', 'Miami', 'FL', '33123'); 22 | insert into drink_order values (123344, 1234, 'Scotch'); 23 | 24 | 25 | select * from customer; 26 | select * from drink_order; -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/8 -SQL Create Table with Auto-Increment Primary Key/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | CREATE TABLE customer ( 4 | id INTEGER auto_increment, 5 | first_name VARCHAR(100), 6 | last_name VARCHAR(100), 7 | address VARCHAR(100), 8 | city VARCHAR(100), 9 | state VARCHAR(2), 10 | zip_code VARCHAR(10), 11 | PRIMARY KEY (id) 12 | ); 13 | 14 | CREATE TABLE drink_order ( 15 | id INTEGER auto_increment, 16 | customer_id INTEGER, 17 | drink_description VARCHAR(100), 18 | PRIMARY KEY (id) 19 | ); 20 | 21 | insert into customer values (null, 'Michael 3', 'Weston', '123 Brickel', 'Miami', 'FL', '33123'); 22 | insert into drink_order values (123344, 1234, 'Scotch'); 23 | 24 | 25 | select * from customer; 26 | select * from drink_order; -------------------------------------------------------------------------------- /14 - Using SQL to Create Tables/9 - SQL Create Table with Foreign Keys/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | DROP TABLE IF EXISTS customer; 4 | DROP TABLE IF EXISTS drink_order; 5 | 6 | CREATE TABLE customer ( 7 | id INTEGER auto_increment, 8 | first_name VARCHAR(100), 9 | last_name VARCHAR(100), 10 | address VARCHAR(100), 11 | city VARCHAR(100), 12 | state VARCHAR(2), 13 | zip_code VARCHAR(10), 14 | PRIMARY KEY (id) 15 | ); 16 | 17 | CREATE TABLE drink_order ( 18 | id INTEGER auto_increment, 19 | customer_id INTEGER, 20 | drink_description VARCHAR(100), 21 | PRIMARY KEY (id), 22 | CONSTRAINT fk_drink_order_customer 23 | FOREIGN KEY (customer_id) 24 | REFERENCES customer (id) 25 | ); 26 | 27 | insert into customer values (null, 'Michael', 'Weston', '123 Brickel', 'Miami', 'FL', '33123'); 28 | insert into drink_order values (123344, 1, 'Scotch'); 29 | 30 | 31 | select * from customer; 32 | select * from drink_order; -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/1 - Introduction/Coming Soon!.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/15 - Using SQL to Update Tables/1 - Introduction/Coming Soon!.docx -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/2 - Introduction to the SQL Alter Table Command/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | ALTER TABLE author add column middle_name varchar(50); 4 | 5 | alter table author drop column middle_name; -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/3 - Using SQL Alter Table Command to Add and Remove a Column/example.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE author add column middle_name varchar(50); 2 | 3 | ALTER TABLE author drop column middle_name; -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/4 - Using SQL Alter Table to Reorder Columns/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | ALTER TABLE author add column middle_name varchar(50); 4 | 5 | ALTER TABLE author CHANGE COLUMN middle_name middle_name VARCHAR(50) after first_name; 6 | 7 | ALTER TABLE author MODIFY middle_name VARCHAR(50) after last_name; 8 | 9 | ALTER TABLE author drop column middle_name; 10 | 11 | ALTER TABLE author add column middle_name varchar(50) AFTER first_name; 12 | -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/5 - Using SQL Alter Table Command to Add or Remove an Index/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | ALTER TABLE author add index (last_name); 4 | 5 | ALTER TABLE author drop index last_name; 6 | 7 | ALTER TABLE author add index last_name_idx (last_name); 8 | 9 | ALTER TABLE author drop index last_name_idx; 10 | -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/6 - Using SQL Alter Table Command to Add or Remove a FK Constraint/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | ALTER TABLE book DROP FOREIGN KEY book_ibfk_1; 4 | 5 | ALTER TABLE book ADD 6 | foreign key fk_book_author (author_id) 7 | REFERENCES author (id); -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/7 - Assignment - Add ASIN, UPC, and EAN to Book Table/AssnAddASINandUPC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/15 - Using SQL to Update Tables/7 - Assignment - Add ASIN, UPC, and EAN to Book Table/AssnAddASINandUPC.pdf -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/8 - Assignment Review - Add ASIN, UPC, and EAN to Book Table/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- Add columns to Book table for ASIN, UPC, EAN. 4 | -- ASIN - Amazon Standard Identification Number - 10 Alphanumeric characters 5 | -- UPC - Universal Product Code - 12 Numeric Digits 6 | -- EAN - International / European Article Number - 13 Numeric Digits 7 | -- Hint: Use Decimal for columns with numeric digits 8 | 9 | ALTER TABLE book ADD COLUMN asin char(10) after isbn; 10 | 11 | ALTER TABLE book ADD COLUMN upc decimal(12, 0) after asin; 12 | 13 | ALTER TABLE book ADD COLUMN ean decimal(13, 0) after upc; -------------------------------------------------------------------------------- /15 - Using SQL to Update Tables/9 - Using SQL Alter Table for MySQL Generated Columns/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- alter statements from previous assignment 4 | 5 | ALTER TABLE book ADD COLUMN asin char(10) after isbn; 6 | 7 | ALTER TABLE book ADD COLUMN upc decimal(12, 0) after asin; 8 | 9 | ALTER TABLE book ADD COLUMN ean decimal(13, 0) after upc; 10 | 11 | ALTER TABLE book ADD COLUMN upc_barcode char(12) as (lpad(upc, 12, '0')); 12 | 13 | SELECT (lpad(12345678, 12, '0')); 14 | 15 | ALTER TABLE book ADD COLUMN ean_barcode char(13) as (lpad(ean, 13, '0')); 16 | 17 | ALTER TABLE book drop column ean_barcode; -------------------------------------------------------------------------------- /2 - Introduction to SQL/1 - Introduction to SQL/2 1 IntroductionMySQL.srt: -------------------------------------------------------------------------------- 1 | 1 2 | 00:00:04,580 --> 00:00:08,400 3 | Alright! Welcome to the course. In this 4 | section of the course, we're gonna start 5 | 6 | 2 7 | 00:00:08,400 --> 00:00:11,790 8 | laying down a baseline. What we need to 9 | do is start establishing a common 10 | 11 | 3 12 | 00:00:11,790 --> 00:00:17,910 13 | terminology and some of the terminology 14 | around SQL like what is a database? What 15 | 16 | 4 17 | 00:00:17,910 --> 00:00:21,720 18 | is a relational model? And things like 19 | that. We have some lectures in this 20 | 21 | 5 22 | 00:00:21,720 --> 00:00:24,900 23 | section of the course. They are just 24 | Powerpoints. They're going to talk about 25 | 26 | 6 27 | 00:00:24,900 --> 00:00:29,279 28 | the history of SQL and MySQL, about 29 | the programming languages, some the key 30 | 31 | 7 32 | 00:00:29,279 --> 00:00:33,600 33 | concepts so we can get that base 34 | terminology down and we're gonna get 35 | 36 | 8 37 | 00:00:33,600 --> 00:00:37,680 38 | some hands-on too. So I'm gonna keep it a 39 | little bit fluid but we also need to 40 | 41 | 9 42 | 00:00:37,680 --> 00:00:42,660 43 | kind of start establishing a baseline of 44 | some common terminology that we can use 45 | 46 | 10 47 | 00:00:42,660 --> 00:00:46,289 48 | going forward. 49 | So I'm gonna try to make it too boring 50 | 51 | 11 52 | 00:00:46,289 --> 00:00:49,289 53 | because I know saying through 54 | powerpoints can be pretty slow and 55 | 56 | 12 57 | 00:00:49,289 --> 00:00:53,430 58 | boring but hopefully you'll get a lot of 59 | benefit and start a really understanding 60 | 61 | 13 62 | 00:00:53,430 --> 00:00:58,079 63 | why SQL is used? Where it came from? 64 | How it came to be? And little bit of a 65 | 66 | 14 67 | 00:00:58,079 --> 00:01:02,270 68 | history of SQL in the industry. 69 | 70 | -------------------------------------------------------------------------------- /2 - Introduction to SQL/1 - Introduction to SQL/2 1 IntroductionMySQL.vtt: -------------------------------------------------------------------------------- 1 | WEBVTT 2 | Kind: captions 3 | Language: en 4 | 5 | 00:00:04.580 --> 00:00:08.400 6 | Alright! Welcome to the course. In this 7 | section of the course, we're gonna start 8 | 9 | 00:00:08.400 --> 00:00:11.790 10 | laying down a baseline. What we need to 11 | do is start establishing a common 12 | 13 | 00:00:11.790 --> 00:00:17.910 14 | terminology and some of the terminology 15 | around SQL like what is a database? What 16 | 17 | 00:00:17.910 --> 00:00:21.720 18 | is a relational model? And things like 19 | that. We have some lectures in this 20 | 21 | 00:00:21.720 --> 00:00:24.900 22 | section of the course. They are just 23 | Powerpoints. They're going to talk about 24 | 25 | 00:00:24.900 --> 00:00:29.279 26 | the history of SQL and MySQL, about 27 | the programming languages, some the key 28 | 29 | 00:00:29.279 --> 00:00:33.600 30 | concepts so we can get that base 31 | terminology down and we're gonna get 32 | 33 | 00:00:33.600 --> 00:00:37.680 34 | some hands-on too. So I'm gonna keep it a 35 | little bit fluid but we also need to 36 | 37 | 00:00:37.680 --> 00:00:42.660 38 | kind of start establishing a baseline of 39 | some common terminology that we can use 40 | 41 | 00:00:42.660 --> 00:00:46.289 42 | going forward. 43 | So I'm gonna try to make it too boring 44 | 45 | 00:00:46.289 --> 00:00:49.289 46 | because I know saying through 47 | powerpoints can be pretty slow and 48 | 49 | 00:00:49.289 --> 00:00:53.430 50 | boring but hopefully you'll get a lot of 51 | benefit and start a really understanding 52 | 53 | 00:00:53.430 --> 00:00:58.079 54 | why SQL is used? Where it came from? 55 | How it came to be? And little bit of a 56 | 57 | 00:00:58.079 --> 00:01:02.270 58 | history of SQL in the industry. 59 | 60 | -------------------------------------------------------------------------------- /2 - Introduction to SQL/10 - FlashCards/MySQL Flashcard.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/2 - Introduction to SQL/10 - FlashCards/MySQL Flashcard.pdf -------------------------------------------------------------------------------- /2 - Introduction to SQL/2 - What is a Database_/WhatIsADatabase.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/2 - Introduction to SQL/2 - What is a Database_/WhatIsADatabase.pdf -------------------------------------------------------------------------------- /2 - Introduction to SQL/3 - Relational Database Principles/RelationalDatabasePrinciples.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/2 - Introduction to SQL/3 - Relational Database Principles/RelationalDatabasePrinciples.pdf -------------------------------------------------------------------------------- /2 - Introduction to SQL/4 - Assignment_ Create Tables and Insert Data/2.4AssnCreateTablesInsertData.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/2 - Introduction to SQL/4 - Assignment_ Create Tables and Insert Data/2.4AssnCreateTablesInsertData.pdf -------------------------------------------------------------------------------- /2 - Introduction to SQL/5 - Assignment Review_ Create Tables and Insert Data/examples.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE customer ( 2 | id INTEGER, 3 | first_name VARCHAR(100), 4 | last_name VARCHAR(100), 5 | address VARCHAR(100), 6 | city VARCHAR(100), 7 | state VARCHAR(2), 8 | zip_code VARCHAR(10) 9 | ); 10 | 11 | CREATE TABLE drink_order ( 12 | id INTEGER, 13 | customer_id INTEGER, 14 | drink_description VARCHAR(100) 15 | ); 16 | 17 | insert into customer values (1234, 'Michael', 'Weston', '123 Brickel', 'Miami', 'FL', '33123'); 18 | insert into drink_order values (123344, 1234, 'Scotch'); 19 | 20 | select * from drink_order; 21 | -------------------------------------------------------------------------------- /2 - Introduction to SQL/5 - Assignment Review_ Create Tables and Insert Data/source_links.txt: -------------------------------------------------------------------------------- 1 | starting source: 2 | ending source: https://github.com/springframeworkguru/mysqlb2g/tree/master/section2/assignment1 -------------------------------------------------------------------------------- /2 - Introduction to SQL/6 - History of SQL/HistoryOfSQL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/2 - Introduction to SQL/6 - History of SQL/HistoryOfSQL.pdf -------------------------------------------------------------------------------- /2 - Introduction to SQL/7 - What is a Relational Database Management System_/WhatIsaRDBMS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/2 - Introduction to SQL/7 - What is a Relational Database Management System_/WhatIsaRDBMS.pdf -------------------------------------------------------------------------------- /2 - Introduction to SQL/8 - History of MySQL/HIstoryOfMySQL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/2 - Introduction to SQL/8 - History of MySQL/HIstoryOfMySQL.pdf -------------------------------------------------------------------------------- /2 - Introduction to SQL/9 - RDBMS Deployment Architectures/RDBMSDeploymentArchtectures.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/2 - Introduction to SQL/9 - RDBMS Deployment Architectures/RDBMSDeploymentArchtectures.pdf -------------------------------------------------------------------------------- /3 - Installation of MySQL/2 - Review of MySQL Installation Options/MySQLInstallationOptions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/3 - Installation of MySQL/2 - Review of MySQL Installation Options/MySQLInstallationOptions.pdf -------------------------------------------------------------------------------- /3 - Installation of MySQL/3 - MySQL Windows Quick Start/MySQL Editions.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/3 - Installation of MySQL/3 - MySQL Windows Quick Start/MySQL Editions.docx -------------------------------------------------------------------------------- /3 - Installation of MySQL/4 - MySQL Windows 10 Installation/source_links.txt: -------------------------------------------------------------------------------- 1 | MySQL on Windows Download Link: https://dev.mysql.com/downloads/windows/ 2 | -------------------------------------------------------------------------------- /3 - Installation of MySQL/5 - MySQL OSX Quick Start/MySQL OSX Installation.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/3 - Installation of MySQL/5 - MySQL OSX Quick Start/MySQL OSX Installation.docx -------------------------------------------------------------------------------- /3 - Installation of MySQL/6 - MySQL OSX Installation/source_links.txt: -------------------------------------------------------------------------------- 1 | Starting Source: https://dev.mysql.com/doc/refman/5.6/en/osx-installation-pkg.html 2 | Ending Source: 3 | -------------------------------------------------------------------------------- /3 - Installation of MySQL/7 - MySQL Linux Installation Quick Start/MySQL Ubuntu Installation.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/3 - Installation of MySQL/7 - MySQL Linux Installation Quick Start/MySQL Ubuntu Installation.docx -------------------------------------------------------------------------------- /3 - Installation of MySQL/9 - MySQL Linux Installation CentOS/source_links.txt: -------------------------------------------------------------------------------- 1 | Starting Source: https://dev.mysql.com/downloads/repo/yum/ 2 | Ending Source: 3 | -------------------------------------------------------------------------------- /4 - Connecting to MySQL/10 - MySQL Workbench Linux Installation Quick Start/MySQL Workbench Linux Installation Quick Start.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/4 - Connecting to MySQL/10 - MySQL Workbench Linux Installation Quick Start/MySQL Workbench Linux Installation Quick Start.docx -------------------------------------------------------------------------------- /4 - Connecting to MySQL/11 - MySQL Workbench Linux Installation/Coming Soon!.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/4 - Connecting to MySQL/11 - MySQL Workbench Linux Installation/Coming Soon!.docx -------------------------------------------------------------------------------- /4 - Connecting to MySQL/2 - Connecting to MySQL Overview/ConnectingToMySQLOverview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/4 - Connecting to MySQL/2 - Connecting to MySQL Overview/ConnectingToMySQLOverview.pdf -------------------------------------------------------------------------------- /4 - Connecting to MySQL/3 - MySQL Command Line for Windows 10/Coming Soon.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/4 - Connecting to MySQL/3 - MySQL Command Line for Windows 10/Coming Soon.docx -------------------------------------------------------------------------------- /4 - Connecting to MySQL/6 - MySQL Workbench Windows Installation Quick Start/MySQL Workbench Windows Installation Quick Start.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/4 - Connecting to MySQL/6 - MySQL Workbench Windows Installation Quick Start/MySQL Workbench Windows Installation Quick Start.docx -------------------------------------------------------------------------------- /4 - Connecting to MySQL/7 - MySQL Workbench Windows Installation/Coming Soon!.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/4 - Connecting to MySQL/7 - MySQL Workbench Windows Installation/Coming Soon!.docx -------------------------------------------------------------------------------- /4 - Connecting to MySQL/8 - MySQL Workbench OSX Installation Quick Start/MySQL Workbench OSX Installation Quick Start.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/4 - Connecting to MySQL/8 - MySQL Workbench OSX Installation Quick Start/MySQL Workbench OSX Installation Quick Start.docx -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/10 - SQL Arithmetic Operators/SQLArithemticOperators.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/5 - Selecting Data from a Single Table/10 - SQL Arithmetic Operators/SQLArithemticOperators.pdf -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/11 - Using SQL Arithmetic Operators in Selecting Data/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM salaries; 4 | 5 | SELECT salary FROM salaries; 6 | 7 | SELECT salary * .01 as weekly FROM salaries; 8 | 9 | SELECT salary, salary * .01 as weekly FROM salaries; 10 | 11 | SELECT salary, 12 | salary * .01 as weekly, 13 | salary * .01 * 4 as monthly FROM salaries; 14 | 15 | SELECT salary, 16 | salary * .01 as weekly, 17 | salary * .01 * 4 as monthly, 18 | salary * .01 * 52 as yearly FROM salaries; 19 | 20 | SELECT salary, 21 | salary * .01 as weekly, 22 | salary * .01 * 4 as monthly, 23 | salary * .01 * 52 as yearly, 24 | salary + 200 * .01 as multiply_first FROM salaries; 25 | 26 | SELECT salary, 27 | salary * .01 as weekly, 28 | salary * .01 * 4 as monthly, 29 | salary * .01 * 52 as yearly, 30 | (salary + 200) * .01 as add_first, 31 | salary *.01 / 7 as daily FROM salaries; 32 | 33 | SELECT salary, 34 | salary * .01 as weekly, 35 | salary * .01 * 4 as monthly, 36 | salary * .01 * 52 as yearly, 37 | (salary + 200) * .01 as add_first, 38 | salary *.01 / 7 as daily, 39 | salary DIV 3 as div_op FROM salaries; 40 | 41 | SELECT salary, 42 | salary * .01 as weekly, 43 | salary * .01 * 4 as monthly, 44 | salary * .01 * 52 as yearly, 45 | (salary + 200) * .01 as add_first, 46 | salary *.01 / 7 as daily, 47 | salary DIV 3 as div_op, 48 | salary % 3 as mod_op FROM salaries; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/12 - SQL Data Types/MySQLDataTypes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/5 - Selecting Data from a Single Table/12 - SQL Data Types/MySQLDataTypes.pdf -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/13 - Formatting Date Values with MySQL/MySQLFormatingDates.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/5 - Selecting Data from a Single Table/13 - Formatting Date Values with MySQL/MySQLFormatingDates.pdf -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/13 - Formatting Date Values with MySQL/example.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM salaries; 4 | 5 | SELECT date_format("2017-06-15", "%M %d %Y"); 6 | 7 | SELECT from_date as original, DATE_FORMAT(from_date, "%M %d %Y") FROM salaries; 8 | 9 | SELECT from_date as original, DATE_FORMAT(from_date, "%M %d %Y") version1, 10 | DATE_FORMAT(from_date, "%m %D %Y") version2, 11 | DATE_FORMAT(from_date, "%m-%d-%Y") version3 12 | FROM salaries; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/14 - Using the LEFT and RIGHT MySQL Functions/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT RIGHT('asdf', 1); 4 | 5 | SELECT LEFT('asdf', 2); 6 | 7 | SELECT * from employees; 8 | 9 | SELECT first_name, last_name, 10 | concat(LEFT(first_name, 1), LEFT(last_name, 1)) as Initials from employees; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/15 - Quiz/Quiz.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/5 - Selecting Data from a Single Table/15 - Quiz/Quiz.pdf -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/16 - Introduction to the SQL WHERE Clause/IntroductionToWhereClause.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/5 - Selecting Data from a Single Table/16 - Introduction to the SQL WHERE Clause/IntroductionToWhereClause.pdf -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/17 - SQL WHERE Clause with Equals and Not Equals/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM employees WHERE first_name = 'Elvis'; 4 | 5 | SELECT * FROM employees WHERE last_name = 'Elvis'; 6 | 7 | SELECT * FROM employees WHERE first_name <> 'Elvis'; 8 | 9 | SELECT * FROM employees WHERE first_name != 'Elvis'; 10 | 11 | SELECT count(*) FROM employees WHERE first_name = 'Elvis'; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/18 - Using AND and OR with SQL WHERE Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM employees WHERE first_name = 'Elvis'; 4 | 5 | SELECT count(*) FROM employees WHERE first_name = 'Elvis'; 6 | 7 | SELECT * FROM employees WHERE first_name = 'Elvis' and gender = 'M'; 8 | 9 | SELECT count(*) FROM employees WHERE first_name = 'Elvis' and gender = 'M'; 10 | 11 | SELECT * FROM employees WHERE first_name = 'Elvis' and last_name = 'Velasco'; 12 | 13 | SELECT * FROM employees WHERE first_name = 'Elvis' or last_name = 'Velasco'; 14 | 15 | SELECT * FROM employees WHERE first_name = 'Elvis' and last_name = 'Velasco' 16 | or first_name = 'Chenye' and last_name = 'Velasco'; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/19 - Using IN and NOT IN with with SQL WHERE Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM employees; 4 | 5 | SELECT * FROM employees WHERE first_name = 'Elvis'; 6 | 7 | SELECT * FROM employees WHERE first_name IN ('Elvis', 'Sumant','Berni', 'Lillian' ); 8 | 9 | SELECT count(*) FROM employees WHERE first_name IN ('Elvis', 'Sumant','Berni', 'Lillian' ); 10 | 11 | SELECT count(*) FROM employees WHERE first_name IN ('Elvis', 'Sumant','Berni', 'Lillian' ) 12 | AND last_name NOT IN ('Redmiles', 'Feldhoffer', 'Androutsos', 'Schaar'); 13 | 14 | SELECT * FROM employees WHERE first_name IN ('Elvis', 'Sumant','Berni', 'Lillian' ) 15 | AND last_name NOT IN ('Redmiles', 'Feldhoffer', 'Androutsos', 'Schaar'); -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/2 - Importing the MySQL Employee Database/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM employees; 4 | 5 | SELECT count(*) FROM employees; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/20 - Dealing with NULL Values in SQL WHERE Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from titles where to_date is null; 4 | 5 | select * from information_schema.PLUGINS where PLUGIN_LIBRARY IS NULL; 6 | 7 | select * from information_schema.PLUGINS where PLUGIN_LIBRARY IS NOT NULL; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/21 - Using Greater Than and Less Than with SQL WHERE Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from salaries; 4 | 5 | select count(*) from salaries; 6 | 7 | select * from salaries where salary > 66961; 8 | 9 | select count(*) from salaries where salary > 66961; 10 | 11 | select count(*) from salaries where salary < 66961; 12 | 13 | select count(*) from salaries where salary > 66961 and from_date > '1989-06-25'; 14 | 15 | select * from employees; 16 | 17 | select * from employees where first_name > 'sammy'; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/22 - Using LIKE and NOT LIKE with SQL WHERE Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from employees; 4 | 5 | select * from employees where first_name like 'E%'; 6 | 7 | select * from employees where first_name like 'Elv%' and last_name like '_e%'; 8 | 9 | select * from employees where first_name like 'Elv%' and last_name like '_e%' 10 | and last_name not like '%n' ; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/23 - Using BETWEEN and NOT BETWEEN with SQL WHERE Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from salaries; 4 | 5 | select * from salaries where salary > 66074 and salary < 71046; 6 | 7 | select count(*) from salaries where salary >= 66074 and salary <= 71046; 8 | 9 | select count(*) from salaries where salary between 66074 and 71046; 10 | 11 | select * from employees; 12 | 13 | select * from employees where birth_date between '1954-05-01' and '1956-04-20'; 14 | 15 | select count(*) from employees where birth_date between '1954-05-01' and '1956-04-20'; 16 | 17 | select * from employees where birth_date not between '1954-05-01' and '1956-04-20'; 18 | 19 | select count(*) from employees where birth_date not between '1954-05-01' and '1956-04-20'; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/24 - Ordering Results with SQL ORDER BY/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from salaries; 4 | 5 | select * from salaries order by from_date, salary desc; 6 | 7 | select * from employees; 8 | 9 | select * from employees order by first_name; 10 | 11 | select * from employees where first_name = 'Elvis' order by gender desc, birth_date desc, last_name; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/25 - Limit Results with SQL LIMIT Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select count(*) from employees; 4 | 5 | select * from employees LIMIT 20; 6 | 7 | select * from employees LIMIT 0, 20; 8 | 9 | select * from employees LIMIT 19, 20; 10 | 11 | select * from employees order by emp_no LIMIT 0, 20; 12 | 13 | select * from employees order by emp_no LIMIT 19, 20; 14 | 15 | select * from employees limit 300000; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/26 - Using SQL to Select DISTINCT Values/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select distinct first_name from employees; 4 | 5 | select count(distinct first_name) from employees; 6 | 7 | select distinct birth_date from employees; 8 | 9 | select count(distinct birth_date) from employees; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/27 - Using SQL Sub-selects with IN in SQL Where Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select distinct first_name from employees where first_name like 'E%'; 4 | 5 | SELECT 6 | * 7 | FROM 8 | employees 9 | WHERE 10 | first_name IN (SELECT DISTINCT 11 | first_name 12 | FROM 13 | employees 14 | WHERE 15 | first_name LIKE 'E%'); -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/28 - Assignment - Fix SQL Statements/sqlstatementstofix.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT first_name last_name FROM employees; 4 | 5 | SELECT emp_no, salary FROM salaries: 6 | 7 | SELECT first_name as 'First Name', last_name is 'Last Name' FROM employees; 8 | 9 | SELECT first_name, last_name, concat(first_name, ' '', last_name') as 'Name' FROM employees; 10 | 11 | SELECT salary, 12 | salary * .01 as weekly, 13 | salary * .01 * 4 as monthly, 14 | salary * .01 52 as yearly FROM salaries; 15 | 16 | SELECT from_date as original, DATE_FORMAT(from_date, "%M %d %YYYY") FROM salaries; 17 | 18 | SELECT first_name, last_name, 19 | concat(LEFT(first_name, 1), LEFT(last_name, 1))) as Initials from employees; 20 | 21 | SELECT * FROM employees WHERE first_name = 'Elvis' and last_name = 'Velasco' 22 | and first_name = 'Chenye' and last_name = 'Velasco'; 23 | 24 | SELECT * FROM employees WHERE first_name IS IN ('Elvis', 'Sumant','Berni', 'Lillian' ); 25 | 26 | select * from employees where first_name IS LIKE 'Elv%' and last_name IS LIKE '_e%'; 27 | 28 | select * from employees where birth_date between ('1954-05-01' and '1956-04-20'); 29 | 30 | select * from employees order by first_name DESCENDING; 31 | 32 | select * from employees order by emp_no LIMIT 0, 20, 88; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/29 - Assignment Review/fixedSQLStatements.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT first_name last_name FROM employees; 4 | 5 | SELECT first_name, last_name FROM employees; 6 | 7 | SELECT emp_no, salary FROM salaries; 8 | 9 | SELECT first_name as 'First Name', last_name as 'Last Name' FROM employees; 10 | 11 | SELECT first_name, last_name, concat(first_name, ' ', last_name) as 'Name' FROM employees; 12 | 13 | SELECT salary, 14 | salary * .01 as weekly, 15 | salary * .01 * 4 as monthly, 16 | salary * .01 * 52 as yearly FROM salaries; 17 | 18 | SELECT from_date as original, DATE_FORMAT(from_date, "%M %d %Y") as formated_date FROM salaries; 19 | 20 | SELECT first_name, last_name, 21 | concat(LEFT(first_name, 1), LEFT(last_name, 1)) as Initials from employees; 22 | 23 | SELECT * FROM employees WHERE first_name = 'Elvis' and last_name = 'Velasco' 24 | or first_name = 'Chenye' and last_name = 'Velasco'; 25 | 26 | SELECT * FROM employees WHERE first_name IN ('Elvis', 'Sumant','Berni', 'Lillian' ); 27 | 28 | select * from employees where first_name LIKE 'Elv%' and last_name LIKE '_e%'; 29 | 30 | select * from employees where birth_date between '1954-05-01' and '1956-04-20'; 31 | 32 | select * from employees order by first_name desc; 33 | 34 | select * from employees order by emp_no LIMIT 0, 20; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/29 - Assignment Review/sqlstatementstofix.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT first_name last_name FROM employees; 4 | 5 | SELECT emp_no, salary FROM salaries: 6 | 7 | SELECT first_name as 'First Name', last_name is 'Last Name' FROM employees; 8 | 9 | SELECT first_name, last_name, concat(first_name, ' '', last_name') as 'Name' FROM employees; 10 | 11 | SELECT salary, 12 | salary * .01 as weekly, 13 | salary * .01 * 4 as monthly, 14 | salary * .01 52 as yearly FROM salaries; 15 | 16 | SELECT from_date as original, DATE_FORMAT(from_date, "%M %d %YYYY") FROM salaries; 17 | 18 | SELECT first_name, last_name, 19 | concat(LEFT(first_name, 1), LEFT(last_name, 1))) as Initials from employees; 20 | 21 | SELECT * FROM employees WHERE first_name = 'Elvis' and last_name = 'Velasco' 22 | and first_name = 'Chenye' and last_name = 'Velasco'; 23 | 24 | SELECT * FROM employees WHERE first_name IS IN ('Elvis', 'Sumant','Berni', 'Lillian' ); 25 | 26 | select * from employees where first_name IS LIKE 'Elv%' and last_name IS LIKE '_e%'; 27 | 28 | select * from employees where birth_date between ('1954-05-01' and '1956-04-20'); 29 | 30 | select * from employees order by first_name DESCENDING; 31 | 32 | select * from employees order by emp_no LIMIT 0, 20, 88; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/3 - Assignment_ Get Counts of Each Table/AssignmentGetRowCounts.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/5 - Selecting Data from a Single Table/3 - Assignment_ Get Counts of Each Table/AssignmentGetRowCounts.pdf -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/4 - Quiz/Quiz.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/5 - Selecting Data from a Single Table/4 - Quiz/Quiz.pdf -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/5 - Assignment Review_ Get Counts of Each Table/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT count(*) FROM departments; 4 | 5 | SELECT count(*) FROM dept_emp; 6 | 7 | SELECT count(*) FROM dept_manager; 8 | 9 | SELECT count(*) FROM employees; 10 | 11 | SELECT count(*) FROM salaries; 12 | 13 | SELECT count(*) FROM titles; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/7 - Selecting Specific Columns from Tables/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM employees; 4 | 5 | SELECT 6 | first_name, last_name 7 | FROM 8 | employees; 9 | 10 | SELECT 11 | emp_no, salary 12 | FROM 13 | salaries; 14 | -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/8 - Using Aliases to Name Columns/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT first_name, last_name FROM employees; 4 | 5 | SELECT first_name as firstN, last_name as lastN FROM employees; 6 | 7 | SELECT first_name as 'First Name', last_name as 'Last Name' FROM employees; 8 | 9 | SELECT first_name as 'First Name....', last_name as 'Last Name' FROM employees; -------------------------------------------------------------------------------- /5 - Selecting Data from a Single Table/9 - Using the SQL CONCAT Function to Join Columns/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT count(*) FROM employees; 4 | 5 | SELECT first_name, last_name, concat(first_name, last_name) as 'Name' FROM employees; 6 | 7 | SELECT first_name, last_name, concat(first_name, ' ', last_name) as 'Name' FROM employees; 8 | 9 | SELECT first_name, last_name, concat(first_name, ' | ', last_name) as 'Name' FROM employees; 10 | 11 | SELECT first_name, last_name, concat(first_name, ' : ', last_name) as 'Name' FROM employees; 12 | -------------------------------------------------------------------------------- /6 - Grouping and Summarizing Data with SQL/2 - Using the SQL GROUP By clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select first_name, count(*) from employees group by first_name; 4 | 5 | select birth_date, count(*) from employees group by birth_date; 6 | 7 | select salary, count(*) as sal_count from salaries group by salary order by sal_count desc; -------------------------------------------------------------------------------- /6 - Grouping and Summarizing Data with SQL/3 - MySQL Aggregate Functions/MySQLAggreateFunctiosn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/6 - Grouping and Summarizing Data with SQL/3 - MySQL Aggregate Functions/MySQLAggreateFunctiosn.pdf -------------------------------------------------------------------------------- /6 - Grouping and Summarizing Data with SQL/3 - MySQL Aggregate Functions/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/6 - Grouping and Summarizing Data with SQL/3 - MySQL Aggregate Functions/Thumbs.db -------------------------------------------------------------------------------- /6 - Grouping and Summarizing Data with SQL/4 - Using the SQL HAVING Clause/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from salaries; 4 | 5 | select first_name, count(*) as emp_count from employees group by first_name; 6 | 7 | select first_name, count(*) as emp_count from employees group by first_name having emp_count > 250; 8 | 9 | select salary, count(*) as sal_count from salaries group by salary having sal_count > 100 order by sal_count asc; 10 | 11 | select salary, count(*) as sal_count 12 | from salaries 13 | where from_date > '1994-06-24' 14 | group by salary 15 | having sal_count > 50 16 | order by sal_count asc; -------------------------------------------------------------------------------- /6 - Grouping and Summarizing Data with SQL/5 - Using the SQL SUM Function/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from salaries; 4 | 5 | select date_format(from_date, '%Y') from salaries; 6 | 7 | select date_format(from_date, '%Y') as year, sum(salary) from salaries group by year; -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/10 - Using SQL Equi-Joins/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT 4 | dept_name, first_name, last_name, title 5 | FROM 6 | employees AS emp 7 | JOIN 8 | dept_emp AS de ON emp.emp_no = de.emp_no 9 | JOIN 10 | departments AS dept ON de.dept_no = dept.dept_no 11 | JOIN 12 | titles AS t ON t.emp_no = emp.emp_no 13 | WHERE 14 | de.to_date = '9999-01-01' and 15 | t.to_date = '9999-01-01' 16 | ORDER BY dept_name, last_name; 17 | 18 | SELECT 19 | dept_name, first_name, last_name, title 20 | FROM 21 | employees AS emp, 22 | dept_emp AS de, 23 | departments AS dept, 24 | titles AS t 25 | WHERE 26 | emp.emp_no = de.emp_no AND 27 | de.dept_no = dept.dept_no AND 28 | t.emp_no = emp.emp_no AND 29 | de.to_date = '9999-01-01' AND 30 | t.to_date = '9999-01-01' 31 | ORDER BY dept_name, last_name; 32 | 33 | SELECT 34 | count(*) 35 | FROM 36 | employees AS emp, 37 | dept_emp AS de, 38 | departments AS dept, 39 | titles AS t 40 | WHERE 41 | emp.emp_no = de.emp_no AND 42 | de.dept_no = dept.dept_no AND 43 | t.emp_no = emp.emp_no AND 44 | de.to_date = '9999-01-01' AND 45 | t.to_date = '9999-01-01' 46 | ORDER BY dept_name, last_name; -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/11 - Using SQL Union Joins/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- dept manager query 4 | SELECT 5 | dept_name, emp.emp_no, first_name, last_name 6 | FROM 7 | employees AS emp 8 | JOIN 9 | dept_manager AS dm ON emp.emp_no = dm.emp_no 10 | JOIN 11 | departments AS dept ON dm.dept_no = dept.dept_no 12 | WHERE 13 | dm.to_date = '9999-01-01' 14 | ORDER BY dept_name; 15 | 16 | -- dept employee query 17 | SELECT 18 | dept_name, first_name, last_name, title 19 | FROM 20 | employees AS emp 21 | JOIN 22 | dept_emp AS de ON emp.emp_no = de.emp_no 23 | JOIN 24 | departments AS dept ON de.dept_no = dept.dept_no 25 | JOIN 26 | titles AS t ON t.emp_no = emp.emp_no 27 | WHERE 28 | de.to_date = '9999-01-01' 29 | AND t.to_date = '9999-01-01' 30 | ORDER BY dept_name , last_name; 31 | 32 | 33 | 34 | SELECT 35 | dept_name, emp.emp_no, first_name, last_name, 'Manager' as emp_type 36 | FROM 37 | employees AS emp 38 | JOIN 39 | dept_manager AS dm ON emp.emp_no = dm.emp_no 40 | JOIN 41 | departments AS dept ON dm.dept_no = dept.dept_no 42 | WHERE 43 | dm.to_date = '9999-01-01' 44 | UNION 45 | SELECT 46 | dept_name, emp.emp_no, first_name, last_name, 'Staff' as emp_type 47 | FROM 48 | employees AS emp 49 | JOIN 50 | dept_emp AS de ON emp.emp_no = de.emp_no 51 | JOIN 52 | departments AS dept ON de.dept_no = dept.dept_no 53 | JOIN 54 | titles AS t ON t.emp_no = emp.emp_no 55 | WHERE 56 | de.to_date = '9999-01-01' 57 | AND t.to_date = '9999-01-01' 58 | ORDER BY emp_type, dept_name, last_name; 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/12 - Other MySQL Functions/OtherMySQLFunctions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/7 - Using SQL to Select Data from More Than One Table/12 - Other MySQL Functions/OtherMySQLFunctions.pdf -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/13 - Using SQL LEFT OUTER JOINS/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from employees where emp_no not in (select emp_no from dept_manager); 4 | 5 | SELECT * FROM employees as emp 6 | LEFT JOIN dept_manager as dm 7 | ON emp.emp_no = dm.emp_no; 8 | 9 | SELECT emp.emp_no, dm.emp_no, first_name, last_name FROM employees as emp 10 | LEFT JOIN dept_manager as dm 11 | ON emp.emp_no = dm.emp_no; 12 | 13 | SELECT emp.emp_no, dm.emp_no, first_name, last_name FROM employees as emp 14 | LEFT JOIN dept_manager as dm 15 | ON emp.emp_no = dm.emp_no 16 | where dm.emp_no is not null; 17 | -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/14 - Assignment - Write SQL LEFT OUTER JOIN/AssnWriteOuterJoin.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/7 - Using SQL to Select Data from More Than One Table/14 - Assignment - Write SQL LEFT OUTER JOIN/AssnWriteOuterJoin.pdf -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/2 - Overview of SQL Table Joins/OverviewOfSQLJoins.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/7 - Using SQL to Select Data from More Than One Table/2 - Overview of SQL Table Joins/OverviewOfSQLJoins.pdf -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/3 - Introduction to SQL Inner Joins/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM 4 | employees 5 | INNER JOIN 6 | dept_manager 7 | ON employees.emp_no = dept_manager.emp_no; 8 | 9 | SELECT * FROM 10 | employees 11 | JOIN 12 | dept_manager 13 | ON employees.emp_no = dept_manager.emp_no; -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/4 - Using Table Aliases with SQL Inner Joins/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM 4 | employees emp 5 | JOIN 6 | dept_manager dm 7 | ON emp.emp_no = dm.emp_no 8 | JOIN 9 | departments dept 10 | ON dm.dept_no = dept.dept_no; 11 | 12 | SELECT * FROM 13 | employees as emp 14 | JOIN 15 | dept_manager as dm 16 | ON emp.emp_no = dm.emp_no 17 | JOIN 18 | departments as dept 19 | ON dm.dept_no = dept.dept_no; -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/5 - Limiting Columns Displayed with SQL Inner Joins/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT * FROM 4 | employees AS emp 5 | JOIN 6 | dept_manager AS dm 7 | ON emp.emp_no = dm.emp_no 8 | JOIN 9 | departments AS dept 10 | ON dm.dept_no = dept.dept_no; 11 | 12 | SELECT dept_name, emp.emp_no, first_name, last_name FROM 13 | employees AS emp 14 | JOIN 15 | dept_manager AS dm 16 | ON emp.emp_no = dm.emp_no 17 | JOIN 18 | departments AS dept 19 | ON dm.dept_no = dept.dept_no 20 | order by dept_name, last_name; 21 | -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/6 - Using a WHERE Clause with SQL Inner Joins/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT dept_name, emp.emp_no, first_name, last_name FROM 4 | employees AS emp 5 | JOIN 6 | dept_manager AS dm 7 | ON emp.emp_no = dm.emp_no 8 | JOIN 9 | departments AS dept 10 | ON dm.dept_no = dept.dept_no 11 | WHERE 12 | dm.to_date = '9999-01-01' 13 | order by dept_name; 14 | 15 | SELECT dept_name, emp.emp_no, first_name, last_name FROM 16 | employees AS emp 17 | JOIN 18 | dept_manager AS dm 19 | ON emp.emp_no = dm.emp_no 20 | JOIN 21 | departments AS dept 22 | ON dm.dept_no = dept.dept_no 23 | WHERE 24 | dm.to_date = '9999-01-01' 25 | AND emp.gender = 'F' 26 | order by dept_name; 27 | 28 | SELECT dept_name, emp.emp_no, first_name, last_name FROM 29 | employees AS emp 30 | JOIN 31 | dept_manager AS dm 32 | ON emp.emp_no = dm.emp_no 33 | JOIN 34 | departments AS dept 35 | ON dm.dept_no = dept.dept_no 36 | WHERE 37 | dm.to_date = '9999-01-01' 38 | AND emp.gender = 'M' 39 | order by dept_name; 40 | -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/7 - Assignment - Create Department Employee Report/SQLAssignemtnEmployeeReport.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/7 - Using SQL to Select Data from More Than One Table/7 - Assignment - Create Department Employee Report/SQLAssignemtnEmployeeReport.pdf -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/8 - Assignment Review - Create Department Employee Report/example.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- Previous Query 4 | SELECT 5 | dept_name, emp.emp_no, first_name, last_name 6 | FROM 7 | employees AS emp 8 | JOIN 9 | dept_manager AS dm ON emp.emp_no = dm.emp_no 10 | JOIN 11 | departments AS dept ON dm.dept_no = dept.dept_no 12 | WHERE 13 | dm.to_date = '9999-01-01' 14 | ORDER BY dept_name; 15 | 16 | SELECT 17 | dept_name, first_name, last_name, title 18 | FROM 19 | employees AS emp 20 | JOIN 21 | dept_emp AS de ON emp.emp_no = de.emp_no 22 | JOIN 23 | departments AS dept ON de.dept_no = dept.dept_no 24 | JOIN 25 | titles AS t ON t.emp_no = emp.emp_no 26 | WHERE 27 | de.to_date = '9999-01-01' and 28 | t.to_date = '9999-01-01' 29 | ORDER BY dept_name, last_name; -------------------------------------------------------------------------------- /7 - Using SQL to Select Data from More Than One Table/9 - Using SQL Natural Joins/example.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | SELECT 4 | dept_name, first_name, last_name, title 5 | FROM 6 | employees AS emp 7 | JOIN 8 | dept_emp AS de ON emp.emp_no = de.emp_no 9 | JOIN 10 | departments AS dept ON de.dept_no = dept.dept_no 11 | JOIN 12 | titles AS t ON t.emp_no = emp.emp_no 13 | WHERE 14 | de.to_date = '9999-01-01' and 15 | t.to_date = '9999-01-01' 16 | ORDER BY dept_name, last_name; 17 | 18 | SELECT 19 | dept_name, first_name, last_name, title 20 | FROM 21 | employees AS emp 22 | NATURAL JOIN 23 | dept_emp AS de 24 | NATURAL JOIN 25 | departments AS dept 26 | NATURAL JOIN 27 | titles AS t 28 | WHERE 29 | de.to_date = '9999-01-01' and 30 | t.to_date = '9999-01-01' 31 | ORDER BY dept_name, last_name; -------------------------------------------------------------------------------- /8 - Using SQL to Insert Data/10 - Assignment Review - Use SQL Inserts to create a new Employee/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | -- create employee record 4 | -- create title record 5 | -- create employee department record 6 | -- create employee salary record 7 | 8 | INSERT INTO employees SELECT max(emp_no) + 1, '1985-01-01', 'Jessie', 'Porter', 'M', '2018-01-01' FROM employees; 9 | 10 | SELECT * from employees where first_name = 'Jessie' and last_name = 'Porter'; 11 | 12 | INSERT INTO titles VALUES (500002, 'Staff', '2018-01-01', '9999-01-01'); 13 | 14 | INSERT INTO dept_emp VALUES (500002, 'd008', '2018-01-01', '9999-01-01'); 15 | 16 | INSERT INTO salaries VALUES (500002, 120000, '2018-01-01', '9999-01-01'); 17 | 18 | select * from salaries where emp_no = 500002; -------------------------------------------------------------------------------- /8 - Using SQL to Insert Data/3 - Example SQL Insert Statement/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | INSERT INTO departments VALUES ('d999', 'Awesome Gurus'); 4 | 5 | select * from departments; -------------------------------------------------------------------------------- /8 - Using SQL to Insert Data/4 - Specifying Columns in SQL Inserts/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | INSERT INTO departments VALUES ('d999', 'Awesome Gurus'); 4 | 5 | INSERT INTO departments (dept_no, dept_name) VALUES ('d998', 'Awesome Gurus 2'); 6 | 7 | select * from departments; -------------------------------------------------------------------------------- /8 - Using SQL to Insert Data/5 - Assignment - Use SQL to create a record in DEPARTMENTS table/AssignmentInsertIntoDepartmentsTable.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/8 - Using SQL to Insert Data/5 - Assignment - Use SQL to create a record in DEPARTMENTS table/AssignmentInsertIntoDepartmentsTable.pdf -------------------------------------------------------------------------------- /8 - Using SQL to Insert Data/6 - Assignment Review - Use SQL to create a record in DEPARTMENTS table/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from departments; 4 | 5 | INSERT INTO departments VALUES ('d998', 'New Social Media'); 6 | 7 | INSERT INTO departments VALUES ('d997', ''); -------------------------------------------------------------------------------- /8 - Using SQL to Insert Data/7 - Using a SQL Sub-select with SQL Insert Statements/eamples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from employees; 4 | 5 | SELECT max(emp_no) + 1, '1976-01-01', 'John', 'Thompson', 'M', '2018-06-18' FROM employees; 6 | 7 | INSERT INTO employees SELECT max(emp_no) + 1, '1976-01-01', 'John', 'Thompson', 'M', '2018-06-18' FROM employees; 8 | 9 | select * from employees where first_name= 'John'; -------------------------------------------------------------------------------- /8 - Using SQL to Insert Data/9 - Assignment - Use SQL Inserts to create a new Employee/AssUseSQLInsertsCreateEmp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/8 - Using SQL to Insert Data/9 - Assignment - Use SQL Inserts to create a new Employee/AssUseSQLInsertsCreateEmp.pdf -------------------------------------------------------------------------------- /9 - Using SQL to Update Data/3 - Example SQL Update Statement/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from departments; 4 | 5 | insert into departments values ('d999', 'foo'); 6 | 7 | SELECT * FROM departments 8 | WHERE dept_no = 'd999'; 9 | 10 | UPDATE departments 11 | SET dept_name = 'Social Media Marketing' 12 | WHERE dept_no = 'd999'; -------------------------------------------------------------------------------- /9 - Using SQL to Update Data/4 - Assignment - Use SQL Update Statement to Change Employee Name/AssnUpdateEmployeeRecord.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/9 - Using SQL to Update Data/4 - Assignment - Use SQL Update Statement to Change Employee Name/AssnUpdateEmployeeRecord.pdf -------------------------------------------------------------------------------- /9 - Using SQL to Update Data/5 - Assignment Review - Use SQL Update Statement to Change Employee Name/examples.sql: -------------------------------------------------------------------------------- 1 | use employees; 2 | 3 | select * from employees where first_name = 'Jessie' and last_name = 'Porter'; 4 | 5 | SELECT * FROM employees 6 | where emp_no = 500002; 7 | 8 | update employees set first_name = 'Sam', last_name = 'Axe' 9 | where emp_no = 500002; -------------------------------------------------------------------------------- /9 - Using SQL to Update Data/6 - Assignment - Using SQL Update and Insert to Create a New Salary Record/AssnUpdateCreateSalaryRec.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/9 - Using SQL to Update Data/6 - Assignment - Using SQL Update and Insert to Create a New Salary Record/AssnUpdateCreateSalaryRec.pdf -------------------------------------------------------------------------------- /9 - Using SQL to Update Data/9 - Assignment - Re-import the employee database/AssnReImportEmpDatabase.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL/8b1ab0bdddd0127cfc4e1bf264aa7c623f54ef7f/9 - Using SQL to Update Data/9 - Assignment - Re-import the employee database/AssnReImportEmpDatabase.pdf -------------------------------------------------------------------------------- /9 - Using SQL to Update Data/9 - Assignment - Re-import the employee database/source_links.txt: -------------------------------------------------------------------------------- 1 | Starting Source: https://github.com/springframeworkguru/test_db 2 | Ending Source: 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # SQL-Beginner-to-Guru-MySQL-Edition---Master-SQL-with-MySQL 5 | Code Repository for SQL Beginner to Guru: MySQL Edition - Master SQL with MySQL, Published by Packt 6 | --------------------------------------------------------------------------------