add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE student
([s_no] varchar(2), [s_name] varchar(4), [s_age] int)
;
INSERT INTO student
([s_no], [s_name], [s_age])
VALUES
('A1', 'JOHN', 16),
('A2', 'JOE', 16),
('A3', 'TONY', 17)
;

3 rows affected
CREATE TABLE subjects
([s_no] varchar(2), [subject] varchar(7), [score] int)
;
INSERT INTO subjects
([s_no], [subject], [score])
VALUES
('A1', 'Math', 58),
('A1', 'History', 70),
('A2', 'English', 49),
('A2', 'History', 90),
('A3', 'Math', 35),
('A3', 'English', 77)
;

6 rows affected
select student.s_name,student.s_age,subjects.subject
from subjects
left join student on subjects.s_no = student.s_no
where subjects.s_no='A2' and subjects.score>='60'
s_name s_age subject
JOE 16 History