SQL, using "AND"


#1

I’m new to this and i was playing around with the code to see if i could narrow the origin down to show only “SNA” but everything I’ve tried hasn’t worked…


#2

Please remember to include a link to the exercise in new topics relating to a lesson. Thanks.


#3

https://www.codecademy.com/courses/sql-table-transformation/lessons/subqueries/exercises/correlated-ii?action=lesson_resume


#4

This came up with two results…

select id, origin from flights f
where f.origin is "SNA";
|id|origin|
|---|---|
|17107|SNA|
|17661|SNA|

select id, origin, destination from flights f
where f.origin is "SNA";
|id|origin|destination|
|---|---|---|
|17107|SNA|SJC|
|17661|SNA|PHX|