SQL Lab Report Northwind Database
Lab Tasks
Introduction:
In this lab, we worked on the Northwind database to practice SQL queries.
We explored data retrieval using SELECT, filtering using WHERE, and joining related tables.
The goal was to understand SQL operations using real-world business data.
Tasks:
• Create a new table Student which have the following schema Student( RegNo: String,
FirstName:String, LastName: String, GPA: Float, Contact: Integer)
• Add at least 5 records of your own class in which one or two students have GPA undefined.
• Display all the data from the table Student
• Display specific columns form the table Student
• Display all the data of students where GPA > 3.5
• Display all the data of students where GPA <= 3.5
Display first and last name of all students as single column using concatenation operator “||”.
Your task is to write SQL statements corresponding to each operator using Northwind schema
• Identify at least one SQL statement in which precedence can affect the result of query.
• Identify how the result of a mathematical expression on null value affect the result of a query.
• Use the distinct operator to eliminate the duplicates in your SQL statement.
• Write at least 3 SQL statements using Northwind schema which use ORDER BY clause
• Limit the result of 3 ORDER BY queries to 10 rows.
Results:
Create a new table Student which have the following schema Student( RegNo: String,
FirstName:String, LastName: String, GPA: Float, Contact: Integer)
Add at least 5 records of your own class in which one or two students have GPA
undefined.
Display all the data from the table Student
Display specific columns form the table Student
Display all the data of students where GPA > 3.5
Display all the data of students where GPA <= 3.5
Does the above 2 queries covers all the data?
Display first and last name of all students as single column using concatenation operator
“||”.
NORTHWIND TASKS
Your task is to write SQL statements corresponding to each operator using Northwind
schema
Identify at least one SQL statement in which precedence can affect the result of query
Use the distinct operator to eliminate the duplicates in your SQL statement.
Write at least 3 SQL statements using Northwind schema which use ORDER BY clause
Limit the result of 3 ORDER BY queries to 10 rows.