
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Master sql for data management by learning the basic concepts of database and structure query language in this course. Meet instructor Biz Nigatu who guides you through sql fundamentals.
Learn database basics by installing Microsoft SQL Server developer edition, using SSMS shortcuts, creating a sample CIA database, writing SQL, and applying comments, drag-and-drop, and context switching.
Here are the CIA-Factbook Database setup scripts used in this course. We will cover how to set up the database in Section 1 - Lecture 7
Understand that a database is an organized collection of data used to model an organization, with entities and relationships, managed by a DBMS using SQL Server.
Compare SQL Server editions by features and cost, noting Express Edition is free but limited, Enterprise is production ready but costly, and Developer Edition is free for demo.
Download and install the SQL Server developer edition, configure a default instance and mixed authentication. Then install SQL Server Management Studio (SSMS) to write SQL with the GUI.
Explore the SQL Server Management Studio environment, create a secure user, connect via localhost, navigate databases and server objects, and use shortcuts to run and debug queries.
Learn to create a sample database in SQL Server, configure data files, switch context with use, and load a CIA Factbook dataset to explore tables and top 1000 rows.
Learn why and how to use SQL comments to document scripts for multi-developer projects, including author, purpose, and revisions. Explore multi-line and single-line comment syntax.
Learn the basic structure of an sql query, covering select, from, where, group by, having, and order by, including set operations such as union, intersect, and except, plus with expressions.
Explore select and order by clauses, learn to select specific or all columns, use top values, filter duplicates, perform mathematical operations, and apply system functions.
Explore the basic select clause in SQL, showing how to select numbers, strings, and date literals, alias columns with AS, and run queries in SQL Server Management Studio.
Learn how to select all columns from a table using the from clause, demonstrated with a country table, and note that this is not recommended in production.
Learn to project only specific columns, such as country name and population, and display the top n rows using the TOP function in SQL Server.
Learn to change a column heading in a select statement, perform arithmetic with columns, alias results, and understand operator precedence in SQL Server.
Discover how to apply built-in functions in a select statement, including date/time, rounding with precision, cast to remove zeros, hostname retrieval, and string operations like upper and reverse.
Explore conditional evaluation in a select statement using case when and the iif function to categorize GDP as developed or underdeveloped, based on thresholds like GDP greater than 300 billion.
Filter duplicates in a select statement by using the distinct keyword to return unique rows, or use group by to achieve the same outcome in reports.
Learn to use the order by clause to sort results in ascending or descending order (ASC or DESC) and, when needed, order by multiple columns such as name and elevation.
Explore SQL Server exercises: identify top ten lakes by area, ensure unique river names, compute (4+5)*6, and display all airport table columns ordered by state.
Learn to solve SQL questions by extracting top 10 lakes by area, predicting sea level with depth plus six feet, and ordering airport results by state and name.
Learn how to use the basic where clause to filter data from a table with string, number, or date literals, selecting specific rows rather than whole records.
Explore using comparison operators in a where clause, including greater than and not equal to, with literals and an example filtering elevations to illustrate the concept.
Learn to use boolean operators in a where clause to refine SQL queries by combining city and state conditions with and, or, and not, filtering results like Colorado cities.
Learn to use the like operator to filter rows by pattern in SQL Server, using wildcards % and _ to match partial strings, and not like to exclude items.
Learn how to use the in operator in the where clause to filter records from a list of values or a subselect, with examples using countries and their capitals.
Learn how the exists operator works in a where clause, compare it with in, handle nulls, and use not exists to filter records with subqueries and practical examples.
Use the between operator in a where clause to filter records by inclusive lower and upper bounds, illustrated with dates and elevations, and compare to using two conditional statements.
Use is null and is not null to filter missing or present values in where clauses; avoid = or <> with null, and apply to elevation and city data.
Practice solving sql queries with exercises on listing new york cities, islands elevation 3000-4000, countries by continents, us airports by elevation, and top lakes by area using where conditions.
Learn to use a basic group by clause to group and summarize data, calculating total and average populations by state or province.
Learn to write subqueries with group by to summarize data and use a where clause to filter with a subselect, revealing the religion with the maximum followers per country.
Learn to use aggregate functions in the order by clause for group by queries, and the execution order of the from clause, with max and column headings in descending results.
Learn to use the basic having clause to filter aggregated results, and compare it with where, with an example of countries where religion exceeds 70 percent of the population.
Solve SQL exercise solutions by identifying the country with the smallest GDP, calculating city population growth using CTEs and window functions, and ranking top five countries by lake area.
Learn how to use a basic from clause, alias tables, and join tables to build queries. Select columns from a country table and understand execution order in sql.
Learn how to use the as operator or a table alias in the from clause, such as aliasing country as c, to reference its columns more succinctly in SQL.
Learn how to join tables using simple joins, understand different join types, and avoid ambiguous column names by aliasing and renaming columns in the result set.
Explore execution order in SQL Server with joins across multiple tables, using aliases to avoid ambiguity, and ordering results, including finding the religion with the most followers per country.
Create and manage SQL tables with constraints, data types, and identity columns in MS SQL Server. Learn data security, primary keys, and practical table design using SSMS.
learn how to alter tables by adding columns, rename tables, and drop tables in MS SQL Server, with notes on Unicode support and safe deletion.
Explore how to create and work with temporary tables, including local # and global ## types, and learn their session scope, plus inserting, querying, and indexing.
Create a many-to-many relationship between students and courses with a third table, define primary and foreign keys, apply optional cascade, and generate an entity-relationship diagram.
Explore SQL Server constraints to enforce data integrity and normalization, including primary keys, unique constraints, foreign keys, and check, default, and domain integrity rules.
Explore how clustered and non-clustered SQL Server indexes affect data storage and query performance, including primary keys creating clustered indexes and steps to create or drop indexes on tables.
Create a view from a select statement to reuse complex queries as a virtual table. Ensure unique column names or aliases, and use views to restrict access to specific fields.
Master granting, revoking, and denying permissions in SQL Server across server and database levels. Create logins and users, assign roles, and use views to protect sensitive data while controlling access.
Explore inner joins and other join types like right and cross join, and learn to implement them in queries and where clauses. Cover union, intersect, and except operations.
Explore how left outer join and right outer join retrieve all records from one table and matched rows from another, using practical country and desert examples.
Learn how full outer join combines left and right joins and how cross join produces a Cartesian product, with practical notes on when to use or avoid them for performance.
Learn to use subqueries in the from clause and join tables with a where clause, including left and inner joins, to combine country and mountain data in MS SQL Server.
Learn how to use cross apply in the from clause to join queries and project population data by country, illustrating multiple ways to write the same query.
Explore how to apply SQL set operations union, intersect, and except on two union-compatible tables, ensuring the column count, order, and data types match, and handle duplicates.
Learn how to cast and convert data types in MS SQL Server using cast and convert, handle flawed data, format timestamps, and enable set operations and complex data transformations.
Learn to create databases and tables, and use insert into, insert select, and select into to add or copy data and create new tables.
Learn to import external data into a table with bulk insert, using delimited files (comma) terminated by carriage returns, and create or populate a new table from the data.
Learn to use the update clause and update with a where clause in MS SQL Server to modify specific records safely, avoiding overwriting rows, with first and last name examples.
Learn how to remove data safely with a basic delete from a table using a where clause, recognize the truncate table alternative, and use safe transactions to recover deleted records.
Use the output operator in MS SQL Server to log insert and delete dml operations to a separate table, including who performs them.
Explore the purpose of using with(nolock) in SQL Server, showing how it prevents locking during reads and may return uncommitted, intermediate results within explicit transactions.
Compare union and union all in SQL Server to see how they handle duplicates when combining two tables with matching column order and data types.
Discover how to declare and use table variables in SQL Server, assign values with set or select, and when table variables suit single-batch operations over temporary tables.
Explore how to use cursors in SQL Server, including declaring, opening, fetching, and looping through rows to generate a country economy report, while noting when to prefer set-based queries.
Learn how to use explicit transactions in SQL Server to safely delete and update data, undo changes with rollback, and experiment without risking production data.
Create user defined functions in SQL Server, including scalar and table-valued types, defining parameters and returns, and applying a function to convert Celsius to Fahrenheit in queries.
Learn how to create stored procedures in SQL Server, including defining input and output parameters, returning data, and handling errors with try-catch, while using temporary tables to encapsulate operations.
Explore built-in window functions in SQL Server, including row_number and rank, to rank countries by gdp and format outputs with concatenation and null handling using isnull or concat.
Learn to back up and restore databases in SQL Server using both scripts and GUI, including selecting backup locations, options like compression, and restoring from a backup device.
Use Excel as a reporting tool to fetch data from SQL Server, run a SQL script, load sample CIA factbook data, and refresh the report to reflect changes.
Learn to create SSRS reports from SQL Server data by configuring a Visual Studio BI add-on, creating data sources and queries, and deploying to a report server for web access.
Create tableau reports from sql server data by linking to localhost, using windows credentials, and building self-service dashboards with views, charts, and filters.
This course will give you hands-on learning of SQL using Microsoft SQL Server. The course will teach you how you could download a free copy of SQL Server 2017 Edition from Microsoft website and set up your working environment. It will teach you various objects in SQL Server including tables, views, stored procedures. After providing you a basic structure of a SQL query structure, it will show different SQL clauses in a way that will make more sense for students to follow. It will give you a basic understanding of how you can manage your data and protect it. The course will show you how you can be able to query data, sort, restrict the output and build sub-queries. You will also understand how you can manipulate data insert, delete and update works. The course will teach how you can group and summarize your data. The course will briefly touch some advanced concepts and how you can be able to build reports using Excel, SQL Server Reporting Service, and Tableau. Finally, the course will show you can get help when while working as a SQL developer and some career advice to work as a SQL developer or analyst.