SlideShare a Scribd company logo
1 of 37
Intro to SQL for Beginners
FREE INVITE
Join 10,000+ Product Managers on
Product
Management
Courses
Coding
for Managers
Courses
Data Analytics
for Managers
Courses
Include @productschool and #prodmgmt at the
end of your tweet
Tweet to get a free ticket
for our next Event!
Michael McClellan
Tonight’s Speaker
Intro to SQL
for Beginners
Product School
ABOUT ME 9PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
About Me
Senior Product ManagerCURRENT
ROLE
PRIOR
EXPERIENCE
EDUCATION
Project Manager
QA Analyst
A.B. in Economics and
Government & Legal Studies
AGENDA 10PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Agenda
So, what is SQL?
Let’s cover the basics
How the data is stored
How a query is constructed
Utilizing conditions, logical operations, calculations, and functions
Joining tables together
How does this help with product management?
SQL Tools and online resources
WHAT IS SQL? 11PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
What is SQL?
SQL, or Structured Query Language, is a computer language used for retrieving,
manipulating, and storing data in a relational database.
Common relational database management systems that use SQL include
Oracle, Microsoft SQL Server, Access, and MySQL.
LET’S COVER THE BASICS 12PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
A relational database is organized by tables
A relational database organizes data into one or more tables
Each table typically represents one entity
Tables are uniquely identified by their names and are constructed to have
relationships with other tables
LET’S COVER THE BASICS 13PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
A table stores data in columns and rows
Tables organize data into smaller entities called fields; a field is a column in a
table that maintains specific information about every row in a table
A row, or record, is a horizontal entity that represents individual entries in a
table.
A column is a vertical entity that contains all data for a specific field in a table
Each column has a specified name, datatype (i.e. datetime, varchar, int), and
attribute (i.e. length, format)
LET’S COVER THE BASICS 14PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Important traits of a relational database
Constraints - rules enforced on data columns to limit the type of data that can go
into a table to ensure accuracy and reliability (i.e. NOT NULL constraint)
Primary keys - uniquely identifies each record in a database table column
Foreign keys - uniquely identifies a record in another database table column
LET’S COVER THE BASICS 15PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Standard SQL commands
SELECT - extracts data from the database
INSERT - inserts new data into the database
UPDATE - updates existing data in the database
DELETE - deletes data from the database
CREATE - creates a new table
DROP - deletes a table
Different Relational Database Systems will have their own extensions of
LET’S COVER THE BASICS 16PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
How a SELECT statement is structured
The SELECT statement is used to retrieve data from the database and is stored
in a result table known as a result-set
Every SELECT statement will have the same basic structure:
SELECT (the fields you want returned) from (the specified table);
or put another way:
SELECT column1, column2 from table_name
LET’S COVER THE BASICS 17PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Using the SELECT statement
Example:
SELECT first_name, last_name from Customers;
Example:
To select all columns from a table, use ‘*’ instead of the column names
SELECT * from Customers;
LET’S COVER THE BASICS 18PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Using the WHERE clause to limit results
● The WHERE clause is used with the SELECT statement to restrict the result-
set by filtering on specific values:
SELECT column1, column2 from table_name WHERE column1 = 'value';
● Example:
○ SELECT * from Customers WHERE first_name = 'Tom';
LET’S COVER THE BASICS 19PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Using logical operations to further limit results
The AND and OR operators can be used with the WHERE clause to filter results
based on more than one condition
For the AND operator, results will surface only if conditions on both sides of the AND operator
are true
For the OR operator, results will surface if a condition on either of the OR operator is true
LET’S COVER THE BASICS 20PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Using logical operations to further limit results
SELECT name, league from Products WHERE year > 2012 AND league = 'NFL';
SELECT name, league from Products WHERE year < 2012 OR league = 'MLB';
LET’S COVER THE BASICS 21PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Using logical operations to further limit results
IN and BETWEEN are other useful operators; they will return all records where
the condition is true
SELECT last_name, email from Customers WHERE first_name IN ('David','Paul')
SELECT name from Products WHERE year BETWEEN 2012 AND 2016
The LIKE operator combined with “%” can be used for string matching
SELECT * from Products WHERE name like '%Super Bowl%'
LET’S COVER THE BASICS 22PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Other ways to manipulate data and/or limit results
Standard Math calculations (+, -, *, /)
Calculations are done at the record level
SELECT name, salary, salary + '5000', salary + (salary/2) from Employees WHERE start_date
> 2014
LET’S COVER THE BASICS 23PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Other ways to manipulate data and/or limit results
Aggregate functions (COUNT, MAX, MIN, SUM, AVG)
Aggregate functions return results based on evaluating column data
SELECT COUNT(ID) from Products WHERE year = 2017
SELECT SUM(salary) from Employees WHERE department = 'Finance'
SELECT MAX(salary) from Employees WHERE department = 'Engineering'
LET’S COVER THE BASICS 24PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Other ways to manipulate data and/or limit results
The GROUP BY statement is often used with aggregate functions. It works by
aggregating rows together based on a specified column and performing
functions on one or more other columns
SELECT department, SUM(salary) from Employees WHERE start_date > 2016
GROUP BY department;
LET’S COVER THE BASICS 25PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Other ways to manipulate data and/or limit results
Using ORDER BY sorts the result-set in ascending or descending order based
on the specified column
By default, it sorts in ascending order; use ASC or DESC to distinguish how you
want to order results
Combined with LIMIT can help filter results even further
select name, salary from Employees WHERE department = 'Operations'
ORDER BY salary DESC
LIMIT 3
LET’S COVER THE BASICS 26PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Joining tables together to evaluate more data
Joins are used to combine records from one or more tables based on a related
column between them
Joining different tables together allows us to write a single SELECT statement
to evaluate the combined dataset
This is where the Primary Keys and Foreign Keys are important
There are multiple kinds of joins, but we’ll focus on INNER JOIN and LEFT
JOIN
LET’S COVER THE BASICS 27PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Joining tables together to evaluate more data
INNER JOIN combines rows from both tables as long as there is a match
between the columns tied together
If there are rows that do not have a match, these records will not be part of the
combined dataset
LET’S COVER THE BASICS 28PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Joining tables together to evaluate more data
SELECT city, team, year from Teams
INNER JOIN Titles on Titles.team_id = Teams.ID
LET’S COVER THE BASICS 29PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Joining tables together to evaluate more data
The LEFT JOIN is less restrictive than INNER JOIN when it comes to filtering
out data.
Using the LEFT JOIN will return all records from the left-side table and records
from the right-side table if there is a match.
If there is no match with the right-side table then those results appear as NULL
LET’S COVER THE BASICS 30PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Joining tables together to evaluate more data
SELECT city, team, year from Teams
LEFT JOIN Titles on Titles.team_id = Teams.ID
LET’S COVER THE BASICS 31PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Combining it all
We can apply the same operators, functions, etc. on joined tables as we did when
writing a SELECT statement against a single table; allowing us to build a
more robust result-set
SELECT city, team, count(year) from Teams
INNER JOIN Titles on Titles.team_id = Teams.ID
WHERE year < '2017' AND (city LIKE '%New York%' OR city LIKE '%Boston%')
GROUP BY city, team
ORDER BY COUNT(year) ASC
HOW SQL HELPS A PRODUCT MANAGER 32PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
How does this help as a Product Manager?
Product development and writing requirements
Prioritization
Understanding, monitoring, and measuring user behavior
HOW SQL HELPS A PRODUCT MANAGER 33PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Product Development and Requirements
Understanding how the front-end and back-end tie together is incredibly useful
when putting requirements together.
Knowing what data is captured (or is not captured) and how it is structured will
help with determining the scope of work.
HOW SQL HELPS A PRODUCT MANAGER 34PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Prioritization
SQL is a great tool to quantitatively determine backlog priority for both features
and issues that need to be addressed.
Combining this with qualitative analysis helps to better form decisions and
message reasoning to different stakeholders.
HOW SQL HELPS A PRODUCT MANAGER 35PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Understanding, monitoring, and measuring user behavior
SQL makes it easier to combine and analyze event-tracking data with system
data
The ability to tie user data with event-data helps better how users are engaging
with your product; what is failing and what is working.
Combined with qualitative analysis, you can use SQL to determine baseline KPIs
and measure the impact of a new feature.
Also gives insight to help know what is unknown; understanding and knowing
what data is captured can help determine if event tracking needs to changed
as user behavior changes.
HOW SQL HELPS A PRODUCT MANAGER 36PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS
Useful tools and online resources
Analytics tools utilizing SQL
Looker
Periscope
Mode
Online resources
Code Academy
Code School
Part-time Product Management Courses
in New York

More Related Content

What's hot

SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands1keydata
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)Sabana Maharjan
 
Triggers in SQL | Edureka
Triggers in SQL | EdurekaTriggers in SQL | Edureka
Triggers in SQL | EdurekaEdureka!
 
Advanced Sql Training
Advanced Sql TrainingAdvanced Sql Training
Advanced Sql Trainingbixxman
 
SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive TechandMate
 
SQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaSQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaEdureka!
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQLRam Kedem
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL CommandsShrija Madhu
 
Sql queries presentation
Sql queries presentationSql queries presentation
Sql queries presentationNITISH KUMAR
 

What's hot (20)

Sql commands
Sql commandsSql commands
Sql commands
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
 
Triggers in SQL | Edureka
Triggers in SQL | EdurekaTriggers in SQL | Edureka
Triggers in SQL | Edureka
 
Advanced Sql Training
Advanced Sql TrainingAdvanced Sql Training
Advanced Sql Training
 
Sql Basics And Advanced
Sql Basics And AdvancedSql Basics And Advanced
Sql Basics And Advanced
 
SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive
 
Sql operators & functions 3
Sql operators & functions 3Sql operators & functions 3
Sql operators & functions 3
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
SQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaSQL Joins With Examples | Edureka
SQL Joins With Examples | Edureka
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
Sql commands
Sql commandsSql commands
Sql commands
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
 
SQL UNION
SQL UNIONSQL UNION
SQL UNION
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
Sql queries presentation
Sql queries presentationSql queries presentation
Sql queries presentation
 
Sql select
Sql select Sql select
Sql select
 

Similar to Intro to SQL for Beginners

MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresSteven Johnson
 
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343Edgar Alejandro Villegas
 
Using SQL for Data Analysis_ Querying and Manipulating Databases.pdf
Using SQL for Data Analysis_ Querying and Manipulating Databases.pdfUsing SQL for Data Analysis_ Querying and Manipulating Databases.pdf
Using SQL for Data Analysis_ Querying and Manipulating Databases.pdfUncodemy
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSabrinaShanta2
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSaiMiryala1
 
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDSORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDSNewyorksys.com
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxBhupendraShahi6
 
Data Manipulation Language.pptx
Data Manipulation Language.pptxData Manipulation Language.pptx
Data Manipulation Language.pptxEllenGracePorras
 
2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL UsedTheVerse1
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfDraguClaudiu
 
chap 7.ppt(sql).ppt
chap 7.ppt(sql).pptchap 7.ppt(sql).ppt
chap 7.ppt(sql).pptarjun431527
 
AAO BI Portfolio
AAO BI PortfolioAAO BI Portfolio
AAO BI PortfolioAl Ottley
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQueryAbhishek590097
 
Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)Muhammed Thanveer M
 

Similar to Intro to SQL for Beginners (20)

MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
 
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
SQL – The Natural Language for Analysis - Oracle - Whitepaper - 2431343
 
Sql basics
Sql  basicsSql  basics
Sql basics
 
Sq lite module6
Sq lite module6Sq lite module6
Sq lite module6
 
Using SQL for Data Analysis_ Querying and Manipulating Databases.pdf
Using SQL for Data Analysis_ Querying and Manipulating Databases.pdfUsing SQL for Data Analysis_ Querying and Manipulating Databases.pdf
Using SQL for Data Analysis_ Querying and Manipulating Databases.pdf
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDSORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
 
Data Manipulation Language.pptx
Data Manipulation Language.pptxData Manipulation Language.pptx
Data Manipulation Language.pptx
 
01 basic orders
01   basic orders01   basic orders
01 basic orders
 
SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
 
Sql
SqlSql
Sql
 
2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
 
Sql
SqlSql
Sql
 
chap 7.ppt(sql).ppt
chap 7.ppt(sql).pptchap 7.ppt(sql).ppt
chap 7.ppt(sql).ppt
 
AAO BI Portfolio
AAO BI PortfolioAAO BI Portfolio
AAO BI Portfolio
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
 
Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)Statements,joins and operators in sql by thanveer danish melayi(1)
Statements,joins and operators in sql by thanveer danish melayi(1)
 

More from Product School

Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechWebinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechProduct School
 
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Product School
 
Relationship Counselling: From Disjointed Features to Product-First Thinking ...
Relationship Counselling: From Disjointed Features to Product-First Thinking ...Relationship Counselling: From Disjointed Features to Product-First Thinking ...
Relationship Counselling: From Disjointed Features to Product-First Thinking ...Product School
 
Launching New Products In Companies Where It Matters Most by Product Director...
Launching New Products In Companies Where It Matters Most by Product Director...Launching New Products In Companies Where It Matters Most by Product Director...
Launching New Products In Companies Where It Matters Most by Product Director...Product School
 
Cultivating Entrepreneurial Mindset in Product Management: Strategies for Suc...
Cultivating Entrepreneurial Mindset in Product Management: Strategies for Suc...Cultivating Entrepreneurial Mindset in Product Management: Strategies for Suc...
Cultivating Entrepreneurial Mindset in Product Management: Strategies for Suc...Product School
 
Revolutionizing The Banking Industry: The Monzo Way by CPO, Monzo
Revolutionizing The Banking Industry: The Monzo Way by CPO, MonzoRevolutionizing The Banking Industry: The Monzo Way by CPO, Monzo
Revolutionizing The Banking Industry: The Monzo Way by CPO, MonzoProduct School
 
Synergy in Leadership and Product Excellence: A Blueprint for Growth by CPO, ...
Synergy in Leadership and Product Excellence: A Blueprint for Growth by CPO, ...Synergy in Leadership and Product Excellence: A Blueprint for Growth by CPO, ...
Synergy in Leadership and Product Excellence: A Blueprint for Growth by CPO, ...Product School
 
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner,  Challenge Like a VC by former CPO, TripadvisorAct Like an Owner,  Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner, Challenge Like a VC by former CPO, TripadvisorProduct School
 
The Future of Product, by Founder & CEO, Product School
The Future of Product, by Founder & CEO, Product SchoolThe Future of Product, by Founder & CEO, Product School
The Future of Product, by Founder & CEO, Product SchoolProduct School
 
Webinar How PMs Use AI to 10X Their Productivity by Product School EiR.pdf
Webinar How PMs Use AI to 10X Their Productivity by Product School EiR.pdfWebinar How PMs Use AI to 10X Their Productivity by Product School EiR.pdf
Webinar How PMs Use AI to 10X Their Productivity by Product School EiR.pdfProduct School
 
Webinar: Using GenAI for Increasing Productivity in PM by Amazon PM Leader
Webinar: Using GenAI for Increasing Productivity in PM by Amazon PM LeaderWebinar: Using GenAI for Increasing Productivity in PM by Amazon PM Leader
Webinar: Using GenAI for Increasing Productivity in PM by Amazon PM LeaderProduct School
 
Unlocking High-Performance Product Teams by former Meta Global PMM
Unlocking High-Performance Product Teams by former Meta Global PMMUnlocking High-Performance Product Teams by former Meta Global PMM
Unlocking High-Performance Product Teams by former Meta Global PMMProduct School
 
The Types of TPM Content Roles by Facebook product Leader
The Types of TPM Content Roles by Facebook product LeaderThe Types of TPM Content Roles by Facebook product Leader
The Types of TPM Content Roles by Facebook product LeaderProduct School
 
Match Is the New Sell in The Digital World by Amazon Product leader
Match Is the New Sell in The Digital World by Amazon Product leaderMatch Is the New Sell in The Digital World by Amazon Product leader
Match Is the New Sell in The Digital World by Amazon Product leaderProduct School
 
Beyond the Cart: Unleashing AI Wonders with Instacart’s Shopping Revolution
Beyond the Cart: Unleashing AI Wonders with Instacart’s Shopping RevolutionBeyond the Cart: Unleashing AI Wonders with Instacart’s Shopping Revolution
Beyond the Cart: Unleashing AI Wonders with Instacart’s Shopping RevolutionProduct School
 
Designing Great Products The Power of Design and Leadership
Designing Great Products The Power of Design and LeadershipDesigning Great Products The Power of Design and Leadership
Designing Great Products The Power of Design and LeadershipProduct School
 
Command the Room: Empower Your Team of Product Managers with Effective Commun...
Command the Room: Empower Your Team of Product Managers with Effective Commun...Command the Room: Empower Your Team of Product Managers with Effective Commun...
Command the Room: Empower Your Team of Product Managers with Effective Commun...Product School
 
Metrics That Matter: Bridging User Needs and Board Priorities for Business Su...
Metrics That Matter: Bridging User Needs and Board Priorities for Business Su...Metrics That Matter: Bridging User Needs and Board Priorities for Business Su...
Metrics That Matter: Bridging User Needs and Board Priorities for Business Su...Product School
 
Customer-Centric PM: Anticipating Needs Across the Product Life Cycle
Customer-Centric PM: Anticipating Needs Across the Product Life CycleCustomer-Centric PM: Anticipating Needs Across the Product Life Cycle
Customer-Centric PM: Anticipating Needs Across the Product Life CycleProduct School
 
AI in Action The New Age of Intelligent Products and Sales Automation
AI in Action The New Age of Intelligent Products and Sales AutomationAI in Action The New Age of Intelligent Products and Sales Automation
AI in Action The New Age of Intelligent Products and Sales AutomationProduct School
 

More from Product School (20)

Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - TechWebinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
Webinar: The Art of Prioritizing Your Product Roadmap by AWS Sr PM - Tech
 
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
Harnessing the Power of GenAI for Exceptional Product Outcomes by Booking.com...
 
Relationship Counselling: From Disjointed Features to Product-First Thinking ...
Relationship Counselling: From Disjointed Features to Product-First Thinking ...Relationship Counselling: From Disjointed Features to Product-First Thinking ...
Relationship Counselling: From Disjointed Features to Product-First Thinking ...
 
Launching New Products In Companies Where It Matters Most by Product Director...
Launching New Products In Companies Where It Matters Most by Product Director...Launching New Products In Companies Where It Matters Most by Product Director...
Launching New Products In Companies Where It Matters Most by Product Director...
 
Cultivating Entrepreneurial Mindset in Product Management: Strategies for Suc...
Cultivating Entrepreneurial Mindset in Product Management: Strategies for Suc...Cultivating Entrepreneurial Mindset in Product Management: Strategies for Suc...
Cultivating Entrepreneurial Mindset in Product Management: Strategies for Suc...
 
Revolutionizing The Banking Industry: The Monzo Way by CPO, Monzo
Revolutionizing The Banking Industry: The Monzo Way by CPO, MonzoRevolutionizing The Banking Industry: The Monzo Way by CPO, Monzo
Revolutionizing The Banking Industry: The Monzo Way by CPO, Monzo
 
Synergy in Leadership and Product Excellence: A Blueprint for Growth by CPO, ...
Synergy in Leadership and Product Excellence: A Blueprint for Growth by CPO, ...Synergy in Leadership and Product Excellence: A Blueprint for Growth by CPO, ...
Synergy in Leadership and Product Excellence: A Blueprint for Growth by CPO, ...
 
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner,  Challenge Like a VC by former CPO, TripadvisorAct Like an Owner,  Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
 
The Future of Product, by Founder & CEO, Product School
The Future of Product, by Founder & CEO, Product SchoolThe Future of Product, by Founder & CEO, Product School
The Future of Product, by Founder & CEO, Product School
 
Webinar How PMs Use AI to 10X Their Productivity by Product School EiR.pdf
Webinar How PMs Use AI to 10X Their Productivity by Product School EiR.pdfWebinar How PMs Use AI to 10X Their Productivity by Product School EiR.pdf
Webinar How PMs Use AI to 10X Their Productivity by Product School EiR.pdf
 
Webinar: Using GenAI for Increasing Productivity in PM by Amazon PM Leader
Webinar: Using GenAI for Increasing Productivity in PM by Amazon PM LeaderWebinar: Using GenAI for Increasing Productivity in PM by Amazon PM Leader
Webinar: Using GenAI for Increasing Productivity in PM by Amazon PM Leader
 
Unlocking High-Performance Product Teams by former Meta Global PMM
Unlocking High-Performance Product Teams by former Meta Global PMMUnlocking High-Performance Product Teams by former Meta Global PMM
Unlocking High-Performance Product Teams by former Meta Global PMM
 
The Types of TPM Content Roles by Facebook product Leader
The Types of TPM Content Roles by Facebook product LeaderThe Types of TPM Content Roles by Facebook product Leader
The Types of TPM Content Roles by Facebook product Leader
 
Match Is the New Sell in The Digital World by Amazon Product leader
Match Is the New Sell in The Digital World by Amazon Product leaderMatch Is the New Sell in The Digital World by Amazon Product leader
Match Is the New Sell in The Digital World by Amazon Product leader
 
Beyond the Cart: Unleashing AI Wonders with Instacart’s Shopping Revolution
Beyond the Cart: Unleashing AI Wonders with Instacart’s Shopping RevolutionBeyond the Cart: Unleashing AI Wonders with Instacart’s Shopping Revolution
Beyond the Cart: Unleashing AI Wonders with Instacart’s Shopping Revolution
 
Designing Great Products The Power of Design and Leadership
Designing Great Products The Power of Design and LeadershipDesigning Great Products The Power of Design and Leadership
Designing Great Products The Power of Design and Leadership
 
Command the Room: Empower Your Team of Product Managers with Effective Commun...
Command the Room: Empower Your Team of Product Managers with Effective Commun...Command the Room: Empower Your Team of Product Managers with Effective Commun...
Command the Room: Empower Your Team of Product Managers with Effective Commun...
 
Metrics That Matter: Bridging User Needs and Board Priorities for Business Su...
Metrics That Matter: Bridging User Needs and Board Priorities for Business Su...Metrics That Matter: Bridging User Needs and Board Priorities for Business Su...
Metrics That Matter: Bridging User Needs and Board Priorities for Business Su...
 
Customer-Centric PM: Anticipating Needs Across the Product Life Cycle
Customer-Centric PM: Anticipating Needs Across the Product Life CycleCustomer-Centric PM: Anticipating Needs Across the Product Life Cycle
Customer-Centric PM: Anticipating Needs Across the Product Life Cycle
 
AI in Action The New Age of Intelligent Products and Sales Automation
AI in Action The New Age of Intelligent Products and Sales AutomationAI in Action The New Age of Intelligent Products and Sales Automation
AI in Action The New Age of Intelligent Products and Sales Automation
 

Recently uploaded

NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdfKhaled Al Awadi
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Serviceankitnayak356677
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCRsoniya singh
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCRashishs7044
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...ictsugar
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckHajeJanKamps
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCRashishs7044
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCRashishs7044
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 

Recently uploaded (20)

NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...Global Scenario On Sustainable  and Resilient Coconut Industry by Dr. Jelfina...
Global Scenario On Sustainable and Resilient Coconut Industry by Dr. Jelfina...
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 

Intro to SQL for Beginners

  • 1. Intro to SQL for Beginners
  • 2. FREE INVITE Join 10,000+ Product Managers on
  • 6. Include @productschool and #prodmgmt at the end of your tweet Tweet to get a free ticket for our next Event!
  • 8. Intro to SQL for Beginners Product School
  • 9. ABOUT ME 9PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS About Me Senior Product ManagerCURRENT ROLE PRIOR EXPERIENCE EDUCATION Project Manager QA Analyst A.B. in Economics and Government & Legal Studies
  • 10. AGENDA 10PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Agenda So, what is SQL? Let’s cover the basics How the data is stored How a query is constructed Utilizing conditions, logical operations, calculations, and functions Joining tables together How does this help with product management? SQL Tools and online resources
  • 11. WHAT IS SQL? 11PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS What is SQL? SQL, or Structured Query Language, is a computer language used for retrieving, manipulating, and storing data in a relational database. Common relational database management systems that use SQL include Oracle, Microsoft SQL Server, Access, and MySQL.
  • 12. LET’S COVER THE BASICS 12PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS A relational database is organized by tables A relational database organizes data into one or more tables Each table typically represents one entity Tables are uniquely identified by their names and are constructed to have relationships with other tables
  • 13. LET’S COVER THE BASICS 13PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS A table stores data in columns and rows Tables organize data into smaller entities called fields; a field is a column in a table that maintains specific information about every row in a table A row, or record, is a horizontal entity that represents individual entries in a table. A column is a vertical entity that contains all data for a specific field in a table Each column has a specified name, datatype (i.e. datetime, varchar, int), and attribute (i.e. length, format)
  • 14. LET’S COVER THE BASICS 14PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Important traits of a relational database Constraints - rules enforced on data columns to limit the type of data that can go into a table to ensure accuracy and reliability (i.e. NOT NULL constraint) Primary keys - uniquely identifies each record in a database table column Foreign keys - uniquely identifies a record in another database table column
  • 15. LET’S COVER THE BASICS 15PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Standard SQL commands SELECT - extracts data from the database INSERT - inserts new data into the database UPDATE - updates existing data in the database DELETE - deletes data from the database CREATE - creates a new table DROP - deletes a table Different Relational Database Systems will have their own extensions of
  • 16. LET’S COVER THE BASICS 16PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS How a SELECT statement is structured The SELECT statement is used to retrieve data from the database and is stored in a result table known as a result-set Every SELECT statement will have the same basic structure: SELECT (the fields you want returned) from (the specified table); or put another way: SELECT column1, column2 from table_name
  • 17. LET’S COVER THE BASICS 17PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Using the SELECT statement Example: SELECT first_name, last_name from Customers; Example: To select all columns from a table, use ‘*’ instead of the column names SELECT * from Customers;
  • 18. LET’S COVER THE BASICS 18PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Using the WHERE clause to limit results ● The WHERE clause is used with the SELECT statement to restrict the result- set by filtering on specific values: SELECT column1, column2 from table_name WHERE column1 = 'value'; ● Example: ○ SELECT * from Customers WHERE first_name = 'Tom';
  • 19. LET’S COVER THE BASICS 19PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Using logical operations to further limit results The AND and OR operators can be used with the WHERE clause to filter results based on more than one condition For the AND operator, results will surface only if conditions on both sides of the AND operator are true For the OR operator, results will surface if a condition on either of the OR operator is true
  • 20. LET’S COVER THE BASICS 20PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Using logical operations to further limit results SELECT name, league from Products WHERE year > 2012 AND league = 'NFL'; SELECT name, league from Products WHERE year < 2012 OR league = 'MLB';
  • 21. LET’S COVER THE BASICS 21PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Using logical operations to further limit results IN and BETWEEN are other useful operators; they will return all records where the condition is true SELECT last_name, email from Customers WHERE first_name IN ('David','Paul') SELECT name from Products WHERE year BETWEEN 2012 AND 2016 The LIKE operator combined with “%” can be used for string matching SELECT * from Products WHERE name like '%Super Bowl%'
  • 22. LET’S COVER THE BASICS 22PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Other ways to manipulate data and/or limit results Standard Math calculations (+, -, *, /) Calculations are done at the record level SELECT name, salary, salary + '5000', salary + (salary/2) from Employees WHERE start_date > 2014
  • 23. LET’S COVER THE BASICS 23PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Other ways to manipulate data and/or limit results Aggregate functions (COUNT, MAX, MIN, SUM, AVG) Aggregate functions return results based on evaluating column data SELECT COUNT(ID) from Products WHERE year = 2017 SELECT SUM(salary) from Employees WHERE department = 'Finance' SELECT MAX(salary) from Employees WHERE department = 'Engineering'
  • 24. LET’S COVER THE BASICS 24PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Other ways to manipulate data and/or limit results The GROUP BY statement is often used with aggregate functions. It works by aggregating rows together based on a specified column and performing functions on one or more other columns SELECT department, SUM(salary) from Employees WHERE start_date > 2016 GROUP BY department;
  • 25. LET’S COVER THE BASICS 25PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Other ways to manipulate data and/or limit results Using ORDER BY sorts the result-set in ascending or descending order based on the specified column By default, it sorts in ascending order; use ASC or DESC to distinguish how you want to order results Combined with LIMIT can help filter results even further select name, salary from Employees WHERE department = 'Operations' ORDER BY salary DESC LIMIT 3
  • 26. LET’S COVER THE BASICS 26PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Joining tables together to evaluate more data Joins are used to combine records from one or more tables based on a related column between them Joining different tables together allows us to write a single SELECT statement to evaluate the combined dataset This is where the Primary Keys and Foreign Keys are important There are multiple kinds of joins, but we’ll focus on INNER JOIN and LEFT JOIN
  • 27. LET’S COVER THE BASICS 27PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Joining tables together to evaluate more data INNER JOIN combines rows from both tables as long as there is a match between the columns tied together If there are rows that do not have a match, these records will not be part of the combined dataset
  • 28. LET’S COVER THE BASICS 28PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Joining tables together to evaluate more data SELECT city, team, year from Teams INNER JOIN Titles on Titles.team_id = Teams.ID
  • 29. LET’S COVER THE BASICS 29PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Joining tables together to evaluate more data The LEFT JOIN is less restrictive than INNER JOIN when it comes to filtering out data. Using the LEFT JOIN will return all records from the left-side table and records from the right-side table if there is a match. If there is no match with the right-side table then those results appear as NULL
  • 30. LET’S COVER THE BASICS 30PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Joining tables together to evaluate more data SELECT city, team, year from Teams LEFT JOIN Titles on Titles.team_id = Teams.ID
  • 31. LET’S COVER THE BASICS 31PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Combining it all We can apply the same operators, functions, etc. on joined tables as we did when writing a SELECT statement against a single table; allowing us to build a more robust result-set SELECT city, team, count(year) from Teams INNER JOIN Titles on Titles.team_id = Teams.ID WHERE year < '2017' AND (city LIKE '%New York%' OR city LIKE '%Boston%') GROUP BY city, team ORDER BY COUNT(year) ASC
  • 32. HOW SQL HELPS A PRODUCT MANAGER 32PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS How does this help as a Product Manager? Product development and writing requirements Prioritization Understanding, monitoring, and measuring user behavior
  • 33. HOW SQL HELPS A PRODUCT MANAGER 33PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Product Development and Requirements Understanding how the front-end and back-end tie together is incredibly useful when putting requirements together. Knowing what data is captured (or is not captured) and how it is structured will help with determining the scope of work.
  • 34. HOW SQL HELPS A PRODUCT MANAGER 34PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Prioritization SQL is a great tool to quantitatively determine backlog priority for both features and issues that need to be addressed. Combining this with qualitative analysis helps to better form decisions and message reasoning to different stakeholders.
  • 35. HOW SQL HELPS A PRODUCT MANAGER 35PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Understanding, monitoring, and measuring user behavior SQL makes it easier to combine and analyze event-tracking data with system data The ability to tie user data with event-data helps better how users are engaging with your product; what is failing and what is working. Combined with qualitative analysis, you can use SQL to determine baseline KPIs and measure the impact of a new feature. Also gives insight to help know what is unknown; understanding and knowing what data is captured can help determine if event tracking needs to changed as user behavior changes.
  • 36. HOW SQL HELPS A PRODUCT MANAGER 36PRODUCT SCHOOL INTRO TO SQL FOR BEGINNERS Useful tools and online resources Analytics tools utilizing SQL Looker Periscope Mode Online resources Code Academy Code School
  • 37. Part-time Product Management Courses in New York

Editor's Notes

  1. Thanks for coming!
  2. We currently have a slack community of 10,000
  3. For those of you new here to our meetup, Product School offers 8-week, part-time courses on how to be a product manager.
  4. We also offer a program called Coding for Managers. This course is for professionals without a technical background who want to learn how to code, build a better rapport with engineer teams and increase visibility with hiring managers.
  5. If you'd like a free ticket to our next event, be sure to tweet a picture of your presenter using @productschool or check-in to the event on facebook. Following the presentation, please come show me and I'll take your email to send your free ticket.
  6. Ania Wieczorek
  7. Thanks for coming!