Filtering and Sorting

Filtering data means that only data that meets a certain criterion is shown, for example, that it was made on the same day or for the same customer.
Sorting determines how the data in the database should be sorted, e.g., by ascending order number, by date, by subscriber name, etc.).
The best way to illustrate how they work is to look at the table below, which contains the orders and their details.
Number |
Date |
Customer |
Clerk |
1 |
1.1.97 |
A |
a |
2 |
2.1.97 |
B |
a |
3 |
2.1.97 |
A |
b |
4 |
3.1.97 |
C |
a |
5 |
3.1.97 |
A |
b |
Table of contents
- Sorting
- Filtering
|
1. Sorting
If we sort the orders by customer, the table will be displayed as follows:
Number |
Date |
Customer |
Clerk |
1 |
1.1.97 |
A |
a |
3 |
2.1.97 |
A |
b |
5 |
3.1.97 |
A |
b |
2 |
2.1.97 |
B |
a |
4 |
3.1.97 |
C |
a |
With sorting, we have achieved that the layout of the records ascends by subscriber name, not by record number.
If we select sorting by order number again, the layout will be the same as before sorting.
Number |
Date |
Customer |
Clerk |
1 |
1.1.97 |
A |
a |
2 |
2.1.97 |
B |
a |
3 |
2.1.97 |
A |
b |
4 |
3.1.97 |
C |
a |
5 |
3.1.97 |
A |
b |
2. Filtering
Filtering has a similar function, as it changes the view of the database, but it only shows part of the database. So, for example, filtering by subscriber “A” will show us the following records:
Number |
Date |
Customer |
Clerk |
1 |
1.1.97 |
A |
a |
2 |
2.1.97 |
A |
b |
5 |
3.1.97 |
A |
b |
Filtering by referent “B”:
Number |
Date |
Customer |
Clerk |
3 |
2.1.97 |
A |
b |
5 |
3.1.97 |
A |
b |
With a little thought and the use of filtering and sorting, seemingly complex tasks can be done quickly and easily.