Write a query that returns the first and last names of the students, whose favor
ID: 3666136 • Letter: W
Question
Write a query that returns the first and last names of the students, whose favorite CSE course is either CSE 480 (this class) or CSE 450 (a class Ive taught) Order the results by last name (ties by first name) e is: students (msu id TEXT, first_name TEXT, last_name TEXT, pick_integer INTEGER, talents TEXT, tv_show TEXT, spelling INTEGER, fe elings_about_emoji TEXT, type cat TEXT, favorite number INTEGER. dog or cat person TEXT, favorite color TEXT, wake up TEXT, first cse course INTEGER favorite_cse_course INTEGER, best birthday TEXT, commute_length REAL, three_words TEXT, length_survey TEXT, associates TEXT, gloomiest_zipcode INTEGER, area_code INTEGER)Explanation / Answer
"select first_name, last_name from students where favorita_cse_course = 480 or favorita_cse_course = 450 order by last_name"
The query is given above. In this query we have used "select" to fetch the first_name and last_name. "where" clause is used with "or" key word. we need to order the resulty by last_name, i.e why "order by" clause is used.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.