SlideShare a Scribd company logo
Introduction to SQL
Structured Query Language Overview
By Pradyumn Vibhandik
What is SQL?
• SQL stands for Structured Query Language
• Used to store, retrieve, and manipulate data in
relational databases
• Enables operations such as creating, updating,
and querying databases
SQL Language Categories
• 1. DML – Data Manipulation Language
• 2. DDL – Data Definition Language
• 3. DCL – Data Control Language
• 4. TCL – Transaction Control Language
DML – Data Manipulation
Language
• Used to manipulate records in a table
• Commands:
• - SELECT: Retrieve records
• - INSERT: Add new records
• - UPDATE: Modify records
• - DELETE: Remove records
DDL – Data Definition Language
• Used to define and modify database structure
• Commands:
• - CREATE: Create database or table
• - ALTER: Modify existing structure
• - DROP: Delete database or table
DCL – Data Control Language
• Manages permissions and access control
• Commands:
• - GRANT: Give user access
• - REVOKE: Remove access
TCL – Transaction Control Language
• Manages transactions and data integrity
• Commands:
• - BEGIN: Starts a transaction
• - COMMIT: Saves the transaction
• - ROLLBACK: Reverts the transaction
SQL Database Commands
• CREATE DATABASE database_name;
• DROP DATABASE database_name;
Creating a Table
• CREATE TABLE Students (
• ID INT PRIMARY KEY,
• Name VARCHAR(100),
• Age INT,
• Grade VARCHAR(10)
• );
SQL Clauses & Keywords (1/2)
• SELECT: Retrieve data
• FROM: Specify the table
• WHERE: Filter records
• ORDER BY: Sort results
SQL Clauses & Keywords (2/2)
• GROUP BY: Group rows by value
• HAVING: Filter grouped records
UPDATE Example
• UPDATE Students
• SET Age = 20
• WHERE ID = 1;
Window Functions
• Perform calculations across related rows
• Do not aggregate rows like GROUP BY
• Examples:
• - ROW_NUMBER(), RANK(), DENSE_RANK()
• - SUM(), AVG(), MAX() over a window
Ranking Example
• SELECT Name, Grade,
• RANK() OVER (PARTITION BY Grade ORDER
BY Age DESC) AS RankByAge
• FROM Students;
Running Total Example
• SELECT Name, Grade, Marks,
• SUM(Marks) OVER (PARTITION BY Grade
ORDER BY Name) AS RunningTotal
• FROM Students;
Average Example
• SELECT Name, Grade, Age,
• AVG(Age) OVER (PARTITION BY Grade) AS
AvgAgePerGrade
• FROM Students;
Max Value Example
• SELECT Name, Grade, Marks,
• MAX(Marks) OVER (PARTITION BY Grade)
AS MaxMarksInGrade
• FROM Students;
Thank You
• Questions?
• Contact: pradyumnvibhandik01@gmail.com
• LinkedIn: linkedin.com/in/pradyumn-
vibhandik

More Related Content

PPTX
Lecture - MY-SQL/ SQL Commands - DDL.pptx
PPTX
Unit - II.pptx
PPTX
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
PPTX
unit-ii.pptx
PPTX
PPTX
DBMS: Week 05 - Introduction to SQL Query
PPTX
SQL basics.pptx
PDF
DP080_Lecture_1 SQL lecture document .pdf
Lecture - MY-SQL/ SQL Commands - DDL.pptx
Unit - II.pptx
xjtrutdctrd5454drxxresersestryugyufy6rythgfytfyt
unit-ii.pptx
DBMS: Week 05 - Introduction to SQL Query
SQL basics.pptx
DP080_Lecture_1 SQL lecture document .pdf

Similar to SQL_Introduction_PresentatioFDFdfFfn.pptx (20)

PPT
Sql Commands_Dr.R.Shalini.ppt
PPTX
sql statements & joins
PPTX
SQL: Introduction and its Basic Commands
PPTX
SQL_Presentation.ppt basic version 12.32
PPTX
Mysql-overview.pptx
PPTX
SQL: Data Definition Language(DDL) command
PDF
Structures query language ___PPT (1).pdf
PPTX
Using Basic Structured Query Language lo1.pptx
PPTX
SQL SERVER Training in Pune Slides
PDF
SQL_NOTES.pdf
PDF
Complete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdf
PPTX
SQL.pptx
PPTX
Data base.ppt
PDF
Reviewing SQL Concepts
PPTX
BASIC_OF_DATABASE_PPT__new[1].pptx
PDF
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdf
PPTX
Querying_with_T-SQL_-_01.pptx
PDF
SQL for data scientist And data analysist Advanced
PPTX
SQL Commands
PPTX
Sql Commands_Dr.R.Shalini.ppt
sql statements & joins
SQL: Introduction and its Basic Commands
SQL_Presentation.ppt basic version 12.32
Mysql-overview.pptx
SQL: Data Definition Language(DDL) command
Structures query language ___PPT (1).pdf
Using Basic Structured Query Language lo1.pptx
SQL SERVER Training in Pune Slides
SQL_NOTES.pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdf
SQL.pptx
Data base.ppt
Reviewing SQL Concepts
BASIC_OF_DATABASE_PPT__new[1].pptx
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdf
Querying_with_T-SQL_-_01.pptx
SQL for data scientist And data analysist Advanced
SQL Commands
Ad

Recently uploaded (20)

PPTX
microtomy kkk. presenting to cryst in gl
PPT
BCH3201 (Enzymes and biocatalysis)-JEB (1).ppt
PPTX
ChandigarhUniversityinformationcareer.pptx
PPTX
Your Guide to a Winning Interview Aug 2025.
PPTX
Condensed_Food_Science_Lecture1_Precised.pptx
PPT
NO000387 (1).pptsbsnsnsnsnsnsnsmsnnsnsnsjsnnsnsnsnnsnnansnwjwnshshshs
PDF
ELA Parts of Speech Pronoun Educational Presentation in Green 3D Gradient Sty...
PDF
LSR CASEBOOK 2024-25.pdf. very nice casbook
PPTX
GPAT Presentation PPT and details about imp topics.pptx
PDF
iTop VPN Crack Latest Version 2025 Free Download With Keygen
PPTX
The Stock at arrangement the stock and product.pptx
PPTX
FINAL PPT.pptx cfyufuyfuyuy8ioyoiuvy ituyc utdfm v
PDF
CV of Architect Professor A F M Mohiuddin Akhand.pdf
PPTX
Digital Education Presentation for students.
PDF
MCQ Practice CBT OL Official Language 1.pptx.pdf
PPTX
PE3-WEEK-3sdsadsadasdadadwadwdsdddddd.pptx
PDF
Career Overview of John Munro of Hilton Head
PDF
APNCET2025RESULT Result Result 2025 2025
PPTX
CYBER SECURITY PPT.pptx CYBER SECURITY APPLICATION AND USAGE
DOCX
PRACTICE-TEST-12 is specially designed for those
microtomy kkk. presenting to cryst in gl
BCH3201 (Enzymes and biocatalysis)-JEB (1).ppt
ChandigarhUniversityinformationcareer.pptx
Your Guide to a Winning Interview Aug 2025.
Condensed_Food_Science_Lecture1_Precised.pptx
NO000387 (1).pptsbsnsnsnsnsnsnsmsnnsnsnsjsnnsnsnsnnsnnansnwjwnshshshs
ELA Parts of Speech Pronoun Educational Presentation in Green 3D Gradient Sty...
LSR CASEBOOK 2024-25.pdf. very nice casbook
GPAT Presentation PPT and details about imp topics.pptx
iTop VPN Crack Latest Version 2025 Free Download With Keygen
The Stock at arrangement the stock and product.pptx
FINAL PPT.pptx cfyufuyfuyuy8ioyoiuvy ituyc utdfm v
CV of Architect Professor A F M Mohiuddin Akhand.pdf
Digital Education Presentation for students.
MCQ Practice CBT OL Official Language 1.pptx.pdf
PE3-WEEK-3sdsadsadasdadadwadwdsdddddd.pptx
Career Overview of John Munro of Hilton Head
APNCET2025RESULT Result Result 2025 2025
CYBER SECURITY PPT.pptx CYBER SECURITY APPLICATION AND USAGE
PRACTICE-TEST-12 is specially designed for those
Ad

SQL_Introduction_PresentatioFDFdfFfn.pptx

  • 1. Introduction to SQL Structured Query Language Overview By Pradyumn Vibhandik
  • 2. What is SQL? • SQL stands for Structured Query Language • Used to store, retrieve, and manipulate data in relational databases • Enables operations such as creating, updating, and querying databases
  • 3. SQL Language Categories • 1. DML – Data Manipulation Language • 2. DDL – Data Definition Language • 3. DCL – Data Control Language • 4. TCL – Transaction Control Language
  • 4. DML – Data Manipulation Language • Used to manipulate records in a table • Commands: • - SELECT: Retrieve records • - INSERT: Add new records • - UPDATE: Modify records • - DELETE: Remove records
  • 5. DDL – Data Definition Language • Used to define and modify database structure • Commands: • - CREATE: Create database or table • - ALTER: Modify existing structure • - DROP: Delete database or table
  • 6. DCL – Data Control Language • Manages permissions and access control • Commands: • - GRANT: Give user access • - REVOKE: Remove access
  • 7. TCL – Transaction Control Language • Manages transactions and data integrity • Commands: • - BEGIN: Starts a transaction • - COMMIT: Saves the transaction • - ROLLBACK: Reverts the transaction
  • 8. SQL Database Commands • CREATE DATABASE database_name; • DROP DATABASE database_name;
  • 9. Creating a Table • CREATE TABLE Students ( • ID INT PRIMARY KEY, • Name VARCHAR(100), • Age INT, • Grade VARCHAR(10) • );
  • 10. SQL Clauses & Keywords (1/2) • SELECT: Retrieve data • FROM: Specify the table • WHERE: Filter records • ORDER BY: Sort results
  • 11. SQL Clauses & Keywords (2/2) • GROUP BY: Group rows by value • HAVING: Filter grouped records
  • 12. UPDATE Example • UPDATE Students • SET Age = 20 • WHERE ID = 1;
  • 13. Window Functions • Perform calculations across related rows • Do not aggregate rows like GROUP BY • Examples: • - ROW_NUMBER(), RANK(), DENSE_RANK() • - SUM(), AVG(), MAX() over a window
  • 14. Ranking Example • SELECT Name, Grade, • RANK() OVER (PARTITION BY Grade ORDER BY Age DESC) AS RankByAge • FROM Students;
  • 15. Running Total Example • SELECT Name, Grade, Marks, • SUM(Marks) OVER (PARTITION BY Grade ORDER BY Name) AS RunningTotal • FROM Students;
  • 16. Average Example • SELECT Name, Grade, Age, • AVG(Age) OVER (PARTITION BY Grade) AS AvgAgePerGrade • FROM Students;
  • 17. Max Value Example • SELECT Name, Grade, Marks, • MAX(Marks) OVER (PARTITION BY Grade) AS MaxMarksInGrade • FROM Students;
  • 18. Thank You • Questions? • Contact: pradyumnvibhandik01@gmail.com • LinkedIn: linkedin.com/in/pradyumn- vibhandik