0

question-Write and run a query, with no starter code or hints to answer this question: What is the step for Union Code 990 and a Set ID of SFMTA or COMMN? name of the table- salary_range_by_job_classification my answer code-

SELECT STEP,Union_Code,Set-ID
from salary_range_by_job_classification
where (Union_Code=990) and 
(SetID='SFMTA' or 'COMMN')
zedfoxus
  • 35,121
  • 5
  • 64
  • 63
  • Did my answer help you with your issue? – zedfoxus May 21 '20 at 04:10
  • If my answer solved your issue, you may want to put a closure to your question by clicking on the tick mark by the answer to mark it accepted. It's totally your choice, though. – zedfoxus May 23 '20 at 16:22
  • @zedfoxus i am sorry. Yes your answet helped, thank you –  May 23 '20 at 16:25

1 Answers1

0

You are pretty close. Change your query to:

SELECT STEP, Union_Code, SetID
from salary_range_by_job_classification
where Union_Code=990 and SetID in ('SFMTA', 'COMMN')

You can also write it like so:

SELECT STEP, Union_Code, SetID
from salary_range_by_job_classification
where Union_Code=990 and (SetID = 'SFMTA' or SetID = 'COMMN')

Just make sure you are using the column names correctly, consistently.

zedfoxus
  • 35,121
  • 5
  • 64
  • 63