Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

How does pertussis toxin inhibit phospholipase C?

Answered: 1 week ago

Question

Identify the elements that make up the employee reward package.

Answered: 1 week ago

Question

Understand the purpose, value and drawbacks of the interview.

Answered: 1 week ago