From the course: CompTIA Data+ (DA0-002) Cert Prep
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Sorting results
From the course: CompTIA Data+ (DA0-002) Cert Prep
Sorting results
- [Instructor] The first operation that we need to discuss is sorting a data set. 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 data set 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 data set containing the salaries paid to several employees in our organization. There are many different ways that I could sort…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Structured query language3m 41s
-
SELECT statement2m 27s
-
(Locked)
Sorting results4m 3s
-
(Locked)
Filtering data4m 1s
-
(Locked)
NULL values3m 26s
-
(Locked)
Aggregating data3m 8s
-
(Locked)
Grouping data3m 7s
-
(Locked)
String manipulation2m 43s
-
(Locked)
Working with dates2m 14s
-
(Locked)
Derived values3m 16s
-
(Locked)
Set operations5m 37s
-
(Locked)
Join operations1m 58s
-
(Locked)
Inner joins7m 7s
-
(Locked)
Joining multiple tables6m 34s
-
(Locked)
Outer joins2m 55s
-
(Locked)
Nested queries2m 17s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-