These queries are specified in English, and i need help translating them into SQ
ID: 3924439 • Letter: T
Question
These queries are specified in English, and i need help translating them into SQL, so I can write run and save them on access.
Query 1
List all movies played in Landmark or Music Box. Output only titles and eliminate duplicates.
Query 2
List all stars born after 1960. Order them by their birthdate in ascending order. Output their first names, last names, and birthdates.
Query 3
List all courses taught in Fall 2014. Output only CourseId and Name. Use product or join.
Query 4
Find all students who have an A grade. Output only their first and last names. Eliminate duplicates. Use product or join.
Query 5
Find all instructors who teach in Fall 2014. Output only their first and last names. Eliminate duplicates. Use product or join.
Query 6
Find all movies played in Evanston. Output only their titles and eliminate duplicates. Use product or join.
Explanation / Answer
1)))))))))))))))
select distinct titles from table_name where play=' Landmark' or play='Music Box';
2)))))))))
select first_name,last_name,birthdate from table-name where born>1960 order by birthdate
3))))))))))
select courseid,name from table1,table2 where table1.courseid=table2.courseid and year=2014;
4))))))))
select distict first_name,last_name from table1,table2 where grade='A' and table1.student_id = table2.student_id ;
5))))))))))))
select distict first_name,last_name from table1,table2 where year=2014 and table1.instructor_id = table2.instructor_id ;
6))))))))))))
select distinct movies from table_name1,table-name2 where play='Evanston' and table_name1.mvid= table_name2.mvid;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.