From the course: SQL for Testers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understanding more complex SQL queries

Understanding more complex SQL queries - SQL Tutorial

From the course: SQL for Testers

Start my 1-month free trial

Understanding more complex SQL queries

- We're going to start looking at how to use SQL to help with testing where shortly. But before we do that, I want to take a few more minutes to get into some of the fundamentals of SQL queries. So far, we've been able to see how to use the select, the from, and the where clauses. Let's look at one more, fairly common clause the order by clause. So we'll add that to our query here, order by, and let's order this by first name, send that query, and you can see that the results that we get back are in alphabetical order for the first name we first got As and Bs and so on. We could also change this. We could order it instead by last name. So let's try that out and see what happens. And you can see that now the first name isn't in alphabetical order, but the last name column is. Or we could order it by vehicle year or whatever we wanted a for columns that we can order by. Now, you might have noticed that the order by clause here is making an assumption. Why did it start with the first…

Contents