From the course: CompTIA Data Systems (DSO-001) Cert Prep

Unlock this course with a free trial

Join today to access over 24,000 courses taught by industry experts.

Sorting results

Sorting results

- [Instructor] The first operation that we need to discuss is sorting a dataset. This is one of the most common things that you'll need to do with your data, and it simply reorders the rows of your dataset based upon whatever criteria you provide. We can specify the column or columns that we'd like to sort based upon, and we can also specify the direction of the sorting. If we sort in ascending order, we're sorting from smallest to largest. If we have numeric data, we put the lowest numbers first and the largest numbers last. If we have text data, we sort in alphabetical order from A to Z. When we sort in descending order, we're sorting from largest to smallest, and if we have numeric data, we put the largest numbers first and the smallest values last. If we have text data, we sort in reverse alphabetical order from Z to A. Here's an example of a simple dataset containing the salaries paid to several employees in our organization. There are many different ways that I could sort this…

Contents