-- create a table
CREATE TABLE students (
  stu_id CHAR(6) PRIMARY KEY,
  name VARCHAR(10),
  branch CHAR(4)
);
CREATE TABLE marks (

    stu_id CHAR(6) PRIMARY KEY,
    MATHS INT (2),
    PHYSICS INT (2),
    CHEMISTRY INT (2),
    FOREIGN KEY (stu_id) REFERENCES Students(stu_id)
   
);

-- insert some values
INSERT INTO students VALUES ("MEC001", "RAJ", "MECH" );
INSERT INTO students VALUES ("CSE002", "ASH", "CSE");
INSERT INTO Students VALUES ("ECE003", "SAN", "ECE");


INSERT INTO marks VALUES ("MEC001",18,63,55);
INSERT INTO marks VALUES ("CSE002",42,66,88);
INSERT INTO marks VALUES ("ECE003",45,69,87);
-- fetch some values
SELECT "MIN AND AVERAGE";
SELECT MIN(marks.MATHS), AVG(marks.PHYSICS)
FROM Students, marks 
WHERE Students.stu_id = marks.stu_id;

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: