Register|Login

Have a question? Click here to ask the community.

Quiz 7 – Ordering Data With The Order By Function

| In: MySQL Quizzes | 9,633 views

*You are currently not logged in and your quiz score will not be recorded. Please login or register if you would like to submit your quiz score.

Directions: Answer all questions. Any questions skipped will be scored as wrong answers. Good Luck! 🙂

Example Database


Table Name: contacts

rowfirstNameage
0Robert25
1Justin18
2Chris38

1. Refering to the Example Database above, how would the data be listed if the following MySQL Query was executed:

mysql_query(“SELECT firstName FROM contacts ORDER BY firstName”);


Chris
Robert
Justin

Robert
Chris
Justin

Chris
Justin
Robert
None of the above

2. Refering to the Example Database above, how would the data be listed if the following MySQL Query was executed:

mysql_query(“SELECT firstName FROM contacts ORDER BY age DESC”);


Chris
Robert
Justin

Justin
Robert
Chris

Robert
Chris
Justin
None of the above

3. Refering to the Example Database above, how would the data be listed if the following MySQL Query was executed:

mysql_query(“SELECT firstName FROM contacts
WHERE age > ’20’ ORDER BY firstName ASC”);


Justin
Robert
Chris

Chris
Robert

Robert
Chris

Chris
Justin

4. Refering to the Example Database above, how would the data be listed if the following MySQL Query was executed:

mysql_query(“SELECT firstName FROM contacts
WHERE (age > ’26’ OR age < 26) ORDER BY age DESC");


Chris
Robert
Justin

Justin
Robert
Chris

Robert
Chris
Justin
None of the above

5. Refering to the Example Database above, how would the data be listed if the following MySQL Query was executed:

mysql_query(“SELECT firstName FROM contacts
WHERE (age > ’26’ AND age < 26) ORDER BY age DESC");


Chris
Robert
Justin

Justin
Robert
Chris

Robert
Chris
Justin
None of the above



3 Responses to Quiz 7 – Ordering Data With The Order By Function

Avatar

Krishnan

August 19th, 2015 at 5:27 am

In quiz list it shows 9 Quiz for mysql. Bt i Can’t get Quiz 8 and 9

Avatar

Robert Smith

August 19th, 2015 at 4:29 pm

That’s because videos have not been made for those yet. I hope to get to that soon. Sorry about that.

Avatar

sarathi

December 15th, 2015 at 12:48 pm

Hi MySql Quiz only available on 7 But statics show on 9 so where is the remaining 2 tests

Comment Form

You must be logged in to post a comment.

Users Online

Users Online: 1 User

Most Users Ever Online: 91

Quiz Scores

Advertisments