Easy question - Is this valid SQL?

Discussion in 'MySQL' started by FunkyMonkey, Nov 17, 2011.

  1. #1
    [​IMG]

    For (a), would this be valid SQL to achieve the purpose stated above?

    SELECT DISTINCT s.first_name, s.last_name
    FROM student s, mark_facts mf, employer e, instructor i, period p
    WHERE s.student_id = mf.student_id
    AND e.employer_name = 'Google'
    AND e.employer_id = mf.employer_id
    AND i.first_name = 'Fred'
    AND i.last_name = 'Hollows'
    AND i.instructor_id = mf.instructor_id
    AND p.semester_no = '2'
    AND p.year = '2007'
    AND p.period_key = mf.period_key;

    Thanks :)
     
    FunkyMonkey, Nov 17, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    Yes, it is (which you've probably discovered by now).
     
    Rukbat, Dec 1, 2011 IP