
Explore the media store sample database and master SQL from basic to advanced queries and stored procedures, learning relationships among albums, artists, tracks, playlists, customers, and invoices in SQL Server.
Install sequel server 2019 developer edition and sequel server management studio, configure instance name and connection string, then restart and prepare the sample database to query data for business requirements.
Connect to the database engine via SQL Server Management Studio, configure Windows authentication, create a new database, and load a downloaded sample database to practice querying.
Install and run the MediaStoreDB sample script to create the database, explore tables and objects, and prepare to translate business requirements into sequel queries for reports.
Create a database relationship diagram for the media store database to visualize table relationships. Save, print, and adjust the diagram to help write queries in the next section.
Master the select statement in sql server to retrieve all columns and rows from the customer table, using select, from, and star, then execute to view results.
Select star from album to retrieve all columns. Expand albums to view the title and artist, then execute to fetch all albums from the album table.
Learn to retrieve specific customer fields by selecting first name, last name, and email from the customers table, avoiding select star, with a result of 59 customers.
Select the track name, composer, and unit price from the track table to meet the business requirement, noting some tracks may have empty composer fields.
Learn to retrieve employee id, title, and phone number with a basic select, recognize the employee id as a primary key, and understand joining tables for reports.
Alias the phone column as phone number to display first name, last name, and the phone number in reports.
Run a query on the track table to fetch track id, name, and unit price, aliasing unit price as price per unit for display.
Select distinct countries from the customer table to reveal unique country values in the country column, highlighting how 24 distinct countries emerge from 59 customer rows.
Use the distinct keyword to retrieve all unique employee titles from the employee table, listing titles such as general manager and sales support agent to meet business requirements.
Learn to convert business requirements into sql code by using the where clause to filter tracks by length, selecting track names where milliseconds are less than 150000.
Select first name, last name, and company from customer table, and filter by last name using the like keyword with wildcards to match geo starts with, ends with, or contains.
Select track names from the track table that start with letters a through f using a like clause with a bracket range and a wildcard, then run and review results.
Retrieve track names from the track table that do not start with the letters a through f, using not like or the carrot operator, showing 255 rows.
Pull a report of customer IDs with invoices dated between January 6, 2009 and March 12, 2009 using the between keyword in SQL, selecting customer_id and invoice_date from invoices.
Learn to query the customer table to retrieve customers' first and last names from California and Florida using the in operator, and verify results by displaying the state.
Query the employee table to list first name, last name, and title for all employees whose titles contain manager, identifying the management team with a wildcard search.
Select first name, last name, and title from employees where the title equals 'I.T. staff' to retrieve all matching staff records.
Filter customers by country and last name in SQL, using IN for USA and Canada and a B% wildcard to return first name, last name, and country from customers.
Learn how to query customers not in USA with last names starting with B, using not in and not equal to USA syntax, and verify identical results across methods.
Query the customers table to retrieve first name, last name, city, and state for customers with missing state codes, using is null to filter and returning 29 rows.
Sort Berlin customers by last name using the order by clause, learn ascending order by default, and compare using column indexes for efficient SQL querying.
Select invoices from invoice table where the invoice date is between January 6 and March 12, and order by invoice date descending to show the most recent orders first.
Select employees' first and last names from the Employee table, sort by title descending, then by last name ascending, using order by or column indices one and three.
Learn to query a track table to fetch tracks that have a composer and sort them by track name using a simple select and order by.
Select the customer id and invoice date of the last five invoices created, using top five and order by invoice date descending to retrieve the latest invoices.
In SQL bootcamp for business, product, and data analysts, learn to retrieve the top 10 percent of tracks by length with a SQL query, selecting names and milliseconds.
Learn how to retrieve the first ever invoice by selecting all columns from the invoice table and ordering by invoice date ascending, then taking the top 1 record.
Compute the total price per invoice by aggregating invoice line items with sum(quantity * unit_price) and grouping by invoice id, aliasing the invoice total.
Find the total price per invoice using group by and the having clause to filter invoices with totals greater than ten dollars, by summing quantity times unit price.
Compute the average track length using aggregate functions across all tracks in the track table, aliasing the result as average track length in milliseconds.
Group customers by country, count customers per country, alias the result as number of customers, and order by the count in descending order to show top countries.
Learn to use group by and the having clause to filter countries by customer count. Retrieve countries with five or fewer customers using count(*) across groups.
Group invoices by customer id, count the invoices, alias the result as number of invoices, and optionally order by the maximum to identify customers with the most invoices.
Learn to use multiple aggregate functions in a single select to determine the longest running track and the total tracks from the track table, with max, count, and aliases.
Compute the average runtime, total unit price, highest bytes, and total number of tracks across all albums using aggregate functions on the track table.
Discover how to compute average track runtime, total unit price, highest bytes, and total tracks by album using a group by clause; generate album-level breakdowns with aggregate functions.
Learn how to use concatenation in SQL to display a customer's full name as last, first with a comma, and alongside the country.
Query the track table to show only tracks with a composer, display each track's original unit price and a 50 percent discount, and concatenate the composer with the track name.
Identify tracks with a length below the average by using a nested query that calculates the average track length and compares each track’s length to that value.
Pull first name, last name, and email for customers with invoices totaling over ten dollars by querying across customer and invoice tables, using a subquery and later joins.
Learn to retrieve tracks with no sales by using a subquery to exclude tracks present in invoice line items and join to tracks to show full track details.
Identify genres with zero sales by using subqueries to find tracks with no invoice lines and filter genres by those track ids, preparing you to join tables.
Get Started with SQL Bootcamp for the Business, Product, & Data Analyst and Master SQL Programming allowing interaction with relational data!
Are you a student or professional in the field of data science, business or systems analysis, product or maybe even contemplating an educational or career move to the SQL development world? Have you been looking for a quick and easy way to get up and running with SQL Server 2017, SQL Querying & Reporting, and don't want to go through an overwhelming amount of material just to get your environment setup and ready for building your SQL queries that interact with data? Don't worry as THIS IS THE COURSE FOR YOU!
In my course, I will teach you how to get your environment setup for SQL Server 2017 and help you to build your first set of SQL queries/reports that store and retrieve relational data quickly and through a step-by-step guided approach. I will be showing you all the necessary installation and setup needed for SQL Server 2017, SQL Server Management Studio, and converting business requirements into SQL code.
Take this course and feel proud of the fact that you will be one step closer towards the rewarding field of Software Engineering, Business Analysis, Data Science using Microsoft SQL Server technologies!