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
From the course: CompTIA Data Systems (DSO-001) Cert Prep
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
-
-
-
-
-
-
(Locked)
Structured Query Language3m 41s
-
(Locked)
SELECT statement2m 27s
-
(Locked)
Sorting results4m 3s
-
(Locked)
Filtering data4m 1s
-
(Locked)
Aggregating data3m 8s
-
(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)
Transactions and the ACID model3m 48s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-