Microsoft Fabric Warehouse Tutorial – Schemas, Tables & SELECT Queries | Microsoft Fabric Tutorial

Microsoft Fabric Warehouse Tutorial – Schemas, Tables & SELECT Queries

Microsoft Fabric Warehouse Tutorial – Schemas, Tables & SELECT Queries

In this tutorial, we explore the fundamentals of Microsoft Fabric Warehouse including schemas, table creation, data insertion, and various types of SELECT queries. This guide is perfect for beginners looking to understand structured querying in Fabric’s T-SQL engine.

📘 What is a Schema?

A schema in Microsoft Fabric Warehouse is a logical container that holds database objects such as tables, views, and procedures. Think of it as a folder or namespace to help organize your database.

✅ Create a Schema

CREATE SCHEMA Sales;

📘 What is a Table?

A table is a structured object used to store rows of data across predefined columns. Tables are always created within schemas and support SQL operations like INSERT, SELECT, UPDATE, and DELETE.

✅ Create a Table Inside the Schema

CREATE TABLE Sales.Customer (
    CustomerID INT,
    FirstName VARCHAR(50),
    LastName VARCHAR(50),
    Country VARCHAR(20),
    SignupDate DATETIME2(3)
);

✅ Insert Sample Data

INSERT INTO Sales.Customer (CustomerID, FirstName, LastName, Country, SignupDate)
VALUES
(1, 'Aamir', 'Shahzad', 'USA', '2024-01-01'),
(2, 'Sara', 'Ali', 'Canada', '2024-02-15'),
(3, 'John', 'Doe', 'UK', '2024-03-10');

📘 What is SELECT?

The SELECT statement is used to query and retrieve data from one or more tables. You can select all columns, specific columns, filter results, sort data, and aggregate results.

✅ Select All Records

SELECT * FROM Sales.Customer;
SELECT * FROM dbo.Customer;

✅ Select Specific Columns

SELECT FirstName, Country FROM Sales.Customer;

✅ Filter Data Using WHERE

SELECT * FROM Sales.Customer
WHERE CustomerID > 1;

✅ Sort Data Using ORDER BY

SELECT * FROM Sales.Customer
ORDER BY SignupDate DESC;

✅ Count Total Rows

SELECT COUNT(*) AS TotalCustomers FROM Sales.Customer;

🎬 Watch the Full Tutorial

Blog post written with the help of ChatGPT.