From the course: MySQL Data Analysis
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
The Big 6 - MySQL Tutorial
From the course: MySQL Data Analysis
The Big 6
- [Instructor] All right, let's get into some single table queries. First, I'm going to introduce you to what I call the big six elements of a SQL statement. Understanding these are probably the most important thing that I'm going to teach you during this course. First we have SELECT and FROM. SELECT is where you identify the columns that you want to pull into your results, and FROM is where you identify the table from which to pull those columns. The syntax looks just like this. SELECT some columnName FROM some tableName. The really nice thing about SQL is the syntax is pretty intuitive. You're pretty much just typing out what you want to do, selecting some data from some table. So this one's not too hard to remember. Every SQL statement that you're going to write will contain a SELECT and a FROM. The other four components of the big six are optional, and we'll get into those now. The WHERE clause is optional. This is how you're going to specify some filtering criteria to limit the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Introduction24s
-
(Locked)
Getting to know the database3m 52s
-
(Locked)
The Big 62m 18s
-
(Locked)
The SELECT statement47s
-
(Locked)
The FROM clause39s
-
SELECT * FROM6m
-
(Locked)
The USE statement3m 19s
-
(Locked)
Selecting specific columns4m 18s
-
(Locked)
Challenge: SELECT and FROM1m 24s
-
(Locked)
Solution: SELECT and FROM2m 38s
-
(Locked)
SELECT DISTINCT2m 13s
-
(Locked)
Challenge: SELECT DISTINCT38s
-
(Locked)
Solution: SELECT DISTINCT2m
-
(Locked)
The WHERE clause1m 30s
-
(Locked)
Common WHERE operators4m 59s
-
(Locked)
Challenge: The WHERE clause35s
-
(Locked)
Solution: The WHERE clause2m 23s
-
(Locked)
Combining WHERE and AND4m 22s
-
(Locked)
Challenge: WHERE and AND39s
-
(Locked)
Solution: WHERE and AND1m 37s
-
(Locked)
Combining WHERE and OR3m 38s
-
(Locked)
Challenge: Combining WHERE and OR42s
-
(Locked)
Solution: Combining WHERE and OR3m 21s
-
(Locked)
Combining WHERE and IN4m 35s
-
(Locked)
The LIKE operator2m 37s
-
LIKE wildcard examples5m 6s
-
(Locked)
Challenge: The LIKE operator30s
-
(Locked)
Solution: The LIKE operator2m 28s
-
(Locked)
The GROUP BY clause1m 43s
-
(Locked)
GROUP BY example3m 18s
-
(Locked)
Pro Tip: Using comments and aliases5m 32s
-
(Locked)
Challenge: GROUP BY37s
-
(Locked)
Solution: GROUP BY2m 1s
-
(Locked)
Multiple dimension GROUP BY clauses3m 14s
-
(Locked)
Aggregate functions2m 8s
-
(Locked)
Challenge: Aggregate functions55s
-
(Locked)
Solution: Aggregate functions3m 23s
-
(Locked)
The HAVING clause1m 44s
-
(Locked)
HAVING example2m 54s
-
(Locked)
Challenge: The HAVING clause54s
-
(Locked)
Solution: The HAVING clause3m 11s
-
(Locked)
The ORDER BY clause1m 31s
-
(Locked)
ORDER BY example4m 16s
-
(Locked)
Challenge: The ORDER BY clause30s
-
(Locked)
Solution: The ORDER BY clause1m 47s
-
(Locked)
Recap: The Big 62m 8s
-
(Locked)
-
-
-
-