
Choose from three setup options to access this course: a pre-existing sql server database with ssms, a standalone sql server with ssms, or the sql lite online website.
Install SQL Server on your PC using the free Developer or Express edition for a minimal setup, then install SQL Server Management Studio to write queries with a graphical interface.
Install the SQL Server Management Studio by downloading the installer, following the standard steps after installing SQL Server, and connect to add a database and write your SQL queries.
Install and open sql server management studio, connect with windows authentication, download the Adventureworks backup, restore it as a database, and verify it appears for practice with sql queries.
Learn to import CSV flat files—customer, district, orders, complaints—into SQL Server using the import wizard, define primary keys, adjust data types, and run a quick verification query.
Explore using SQLite online as a no install alternative to SQL Server, learn to sign in, create an account, and import flat files for customers, district, orders, and complaints.
Run a simple sql query to return all columns and rows from the customer table using select star, and execute it with a semicolon in sql server management studio.
Select only the needed columns from a table, use aliases with as and quotes for spaces, format long queries with line breaks, and end with a semicolon.
Learn how to fetch top or bottom rows from a table using top, and how to obtain bottom rows by ordering by client ID in descending order.
Extract distinct values from a table using the distinct keyword, illustrated with district id and ordering by district id to reveal unique districts.
Discover how the order by clause sorts query results, using district and first name examples to illustrate ascending and descending orders and sorting with multiple levels via commas.
Learn how to use concat and delimiters to combine first name and last name into a full name, with options for middle name and separators, in SQL queries 101.
Explore using left and right text functions to extract a specified number of characters from a column, such as the last three of an ssn, treating data as text.
Use the Len function to calculate the total character length, including spaces, for a column or the full name, and apply length checks for IDs.
Learn how the format function in sql formats birth dates, currencies by region, and percentages, with practical examples and varied formatting options.
Learn to use aggregates and grouping in SQL on the orders table, mastering sum, min, max, count, and currency formatting to produce a single-row summary of sales, quantity, and orders.
Learn how the group by clause adds detail to aggregates, returning one row per segment or category by grouping non-aggregate columns and using order by to structure results.
Use the date difference function in SQL to compute age from a birth date, using interval year, start date, end date as current date, and alias as age.
Learn to convert strings to dates in SQL Server, build dates from parts, and extract year, month, and day using format and other date functions.
Master comparison and logical operators in SQL, using the where clause to filter by quantity greater than five, optionally with and, order by, and dynamic aggregates.
Learn to use SQL logical operators, focusing on between and the alternative of using >= and <= to filter orders by quantity between five and ten.
Learn how the like operator enables pattern matching in SQL, using % as a wildcard to find product names containing or starting with printer.
Learn how to filter data using or and in SQL, comparing readability and efficiency when querying the orders table for subcategories such as paper and art.
Explore the remaining logical operators, such as all, any, exists, and some, and connect them to table relationships; revisit after studying customer and orders tables.
Use the having clause after group by to filter aggregated results, such as count of order_id greater than 500, instead of where.
Explore partition by using the over clause to compute min and max age per district id, while observing the default ordering of partitioned results.
Explore inner joins in SQL by linking the customer and district tables on district id and district code, using venn-diagram intuition to retrieve region, state, and city details.
Explore inner joins on orders and complaints to fetch only linked records, selecting key fields from both tables and illustrating how complaints relate to orders.
Learn how left joins return all orders with matching complaints or nulls for none, contrast with inner joins, and switch to right joins to emphasize the right table.
Learn how to join three tables in SQL by combining orders, complaints, and customers using inner and left joins, with attention to linking on the client ID and alias usage.
Join four tables: orders, complaints, customer, and district, using district code to reveal city data. Compare inner and left joins and understand nulls when no complaints exist.
Learn how the full outer join reveals all records from both tables, including unmatched rows with nulls, to merge unrelated data and reveal discrepancies.
Learn how to use the SQL except clause to subtract rows, combining left join and inner join to return orders without complaints.
Use exists with a subquery to retrieve only products or orders that have related complaints, reducing duplication from multiple complaints and focusing on relevant data.
Learn to use subqueries to fetch orders before any complaints are registered. Compare approaches using min(date_received) and the all operator to achieve the same result.
If you are a student or working professional, join me in this engaging beginner course on SQL Queries. This course will teach you how to write SQL Queries for effortless data retrieval with a minimal learning curve.
As of October 2023, I have provided in-person training to over 3,000 professionals, covering skills such as office productivity, programming, databases, analytics, and cloud computing, which enables rapid integration of newfound skill sets.
Course Curriculum
Basic SELECT Statement
Scalar Functions
Aggregates
GROUP BY and HAVING Clause
Comparison and Logical Operators
Table Relationships with JOINS
Sub Queries
Case Switch
SQL Views
CREATE Table
INSERT, UPDATE and DELETE Rows
What this course contains
11 Sections with Easy-to-follow instructional videos
2 Quizzes
Software and Credentials Required
You can install SQL Server Basic along with SQL Server Management Studio.
Alternatively, if you cannot install SQL Server, you may utilize the website SQLiteonline to execute the SQL queries relevant to this course.
Intended Course Outcome
Data Retrieval: Mastering SQL SELECT queries allows learners to efficiently access specific data from one or multiple database tables, ensuring quick and accurate information retrieval.
Data Filtering: Users can employ filtering conditions in SQL SELECT queries using the WHERE clause, enabling data extraction that meets particular criteria, such as date ranges, categories, or values.
Data Sorting: Utilizing SQL SELECT queries, retrieved data can be sorted in ascending or descending order based on one or more columns, simplifying analysis and presentation.
Data Aggregation: Proficiency in SQL SELECT queries empowers users to perform calculations and use aggregate functions (e.g., SUM, AVG, COUNT) on selected data, offering valuable insights and information summaries.
Data Joining: By mastering SQL JOIN clauses, learners can merge data from multiple related tables, promoting extensive data analysis and reporting.