Hi guys !
Please help make a sql-query -
There are three tables -

table STUDENT
(
  STUDENT_ID NUMERIC not null,
  SURNAME    VARCHAR(60),
);
table SUBJECT
(
  SUBJ_ID   NUMERIC not null,
  SUBJ_NAME VARCHAR(100),
);
 table EXAM_MARKS
(
  EXAM_ID    NUMERIC not null,
  STUDENT_ID NUMERIC not null,
  SUBJ_ID    NUMERIC not null,
  MARK       NUMERIC
);

please tell me - which sql-query is needed to get a list of students who receive a positive assessment in all subjects?
Can I do this job without subqueries?
Thanks in advance!

Recommended Answers

All 6 Replies

SELECT

STUDENT.SURNAME

FROM

EXAM_MARKS

INNER JOIN STUDENT ON

EXAM_MARKS.STUDENT_ID = STUDENT.STUDENT_ID

WHERE

MARK > whatevernumberyouwantitobegreaterthan
commented: ++++++++++++ +1

Excellent post.. Thanks for sharing this complicated query..

commented: +++ +1

jeremy24 - Chill, dude )))))))))))));)

your welcome please mark as solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.