Skip to content

Instantly share code, notes, and snippets.

@danielkwood
Created June 29, 2025 02:53
Show Gist options
  • Select an option

  • Save danielkwood/a384fd7ed01cd137995381861637512c to your computer and use it in GitHub Desktop.

Select an option

Save danielkwood/a384fd7ed01cd137995381861637512c to your computer and use it in GitHub Desktop.
SQL code: Create Students table and insert sample data.
-- Create the Students table
CREATE TABLE Students (
StudentID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
YearLevel INT,
AverageScore INT
);
-- Insert sample data into Students table
INSERT INTO Students (StudentID, FirstName, LastName, YearLevel, AverageScore) VALUES
(101, 'Emma', 'Lee', 11, 85),
(102, 'Jack', 'Smith', 12, 78),
(103, 'Mia', 'Patel', 11, 92),
(104, 'Liam', 'Johnson', 12, 88),
(105, 'Zoe', 'Brown', 10, 74);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment