Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 495
  • Last Modified:

Query Optimization (trees) trees against SQL expression

Both these trees represent the same SQL query posed against the Student and Course database tables can you try to  Produce the SQL expression.


clip-image002.jpg
tables.png
0
evry2004
Asked:
evry2004
  • 2
1 Solution
 
SharathData EngineerCommented:
What is your expected result?
0
 
evry2004Author Commented:
SELECT DISTINCT Student-name FROM Student-no, Student, StudentGradeWHERE C.Credit-point= 3
AND S.Student-no = SG.Student-no
AND C.Course-no = SG.Course-no;
0
 
SharathData EngineerCommented:
Are you looking for this?

SELECT DISTINCT S.[Student-Name]
  FROM Student S
  JOIN StudentGrade SG ON S.[Student-No] = SG.[Student-No]
  JOIN Course C ON SG.[Course-No] = C.[Course-No]
 WHERE C.[VCredit-Point] = 3

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now