BY JONATHAN RINFRET
JONATHAN.RINFRET@MY.GAVILAN.EDU

HERE ARE SOME PRACTICE SQL QUERIES TO RUN ON SQL FIDDLE
GO TO SQLFIDDLE.COM
SCHEMAS GO IN THE SCHEMA BOX...
SQL GOES IN THE RUN SQL BOX...(only select statements are allowed in the sql box)

SCHEMA #1

create table student_grades (id int not null, name varchar(50), grade int);

insert into student_grades values (1, "Jonathan", 60);
insert into student_grades values (2, "Alex", 88);
insert into student_grades values (3, "test", 49);

SQL #1-1
Select * from student_grades;

SQL #1-2
select name from student_grades where grade >=60;



SCHEMA #2

create table student_grades (id int not null, name varchar(50), grade int);

insert into student_grades values (1, "Jonathan", 60);
insert into student_grades values (2, "Alex", 88);
insert into student_grades values (3, "test", 49);

update student_grades set grade = 90 where name like "%Alex%";

SQL #2-1
Select * from student_grades;

SQL #2-2
describe student_grades;



SCHEMA #3

create table student_grades (id int not null, name varchar(50), grade int);

insert into student_grades values (1, "Jonathan", 70);
insert into student_grades values (2, "Alex", 100);
insert into student_grades values (3, "test", 50);

SQL #3-1
describe student_grades;

SQL #3-2
select * from student_grades;

SQL#3-3
Select name, grade, id from student_grades where grade >50;
