Question
I need this to be done in SQL. I have been trying to work on this one and this is the code I have so
I need this to be done in SQL. I have been trying to work on this one and this is the code I have so far:
select students.firstname AS "STUDENTFIRST", students.lastname AS "STUDENTLAST", professor.firstname AS "PROFESSORIFRST", professor.lastname AS "PROFESSORLAST", professor.state AS "ST", professor.city AS "CITY" from students INNER JOIN professor ON students.city = professor.city where professor.state ='ID' Order by students.lastname, students.firstname, professor.firstname,professor.lastname, professor.state,professor.city;
This problem does require connecting 2 tables one called " students" and one called "professor." The main issue I am having is getting distinct outputs. Any help is greatly appreciated! If you could solve it and maybe explain why I am having the issue I am having, that would be awesome
10) Show the student first and last name and the professor first and last names for those students who live in the same city in Idaho as their professor lives. Arrange the list by last name then first name of the student. Only show each individual one time. Name columns appropriately
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started