MySQL

Moderators: Jonathan
Number of threads: 258
Number of posts: 511

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Writing an SQL Query Posted by rhysE_b on 6 Nov 2009 at 7:01 AM
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
Report
Re: Writing an SQL Query Posted by aaryn on 6 Nov 2009 at 11:53 AM
Sorry, I don't see you this question, I'm sorry. I wish you to find the correct answer
www.see-shoes.com

Report
Re: Writing an SQL Query Posted by aaryn on 6 Nov 2009 at 11:55 AM
Sorry, I don't see you this question, I'm sorry. I wish you to find the correct answer
www.see-shoes.com

Report
Re: Writing an SQL Query Posted by cheapreplica on 9 Nov 2009 at 12:16 PM
I wish you to find the correct answer。I’m sorry.
Report
Re: Writing an SQL Query Posted by DaiMitnick on 9 Nov 2009 at 2:38 PM
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. |
------------------------------------------



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.