Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Writing an SQL Query

rhysE_brhysE_b Member Posts: 2
Hi Guys,

Im new to this forum so sorry if i am posting in the wrong place.
I am wondering if anyone can help me, i have a test question that i have no idea what the answer is the question is.

"Please write an SQL query to display the first name, surname, and sex of all the technicians who are 25 and over"

and then under the question i have a table that looks something like this -

First Name | Surname | Age | Sex | Position

With 28 names and so on..


If anyone could help with the answer/commands for this that would be great.

Thanks

Comments

  • aarynaaryn Member Posts: 2
    Sorry, I don't see you this question, I'm sorry. I wish you to find the correct answer
    www.see-shoes.com

  • aarynaaryn Member Posts: 2
    Sorry, I don't see you this question, I'm sorry. I wish you to find the correct answer
    www.see-shoes.com

  • cheapreplicacheapreplica Member Posts: 21
    I wish you to find the correct answer?I
  • DaiMitnickDaiMitnick Member Posts: 77
    SELECT First Name, Surname, Sex, FROM NameOfTable WHERE Age > 25 AND Position = 'Technician'

    Obviously change NameOfTable to the actual table name, if you wanna be fancy you could add at the end:

    ORDER BY Age Asc

    or

    ORDER BY Age Desc

    To sort it by age, ascending or descending, or you could sort it by Surname or whatever. Dai


    ------------------------------------------
    Do or do not, there is no try. |
    ------------------------------------------
Sign In or Register to comment.