WEBVTT
Kind: captions
Language: en

00:00:11.950 --> 00:00:14.290
I'm working on a query that shows us a list
of our

00:00:14.290 --> 00:00:15.290
bakery's customers

00:00:15.290 --> 00:00:17.730
who live outside the city limits.

00:00:17.730 --> 00:00:19.039
And there are a couple of things that I'm
going to

00:00:19.039 --> 00:00:21.700
do to make the results easier to read:

00:00:21.700 --> 00:00:24.150
sorting the results, and hiding fields that
we

00:00:24.150 --> 00:00:25.860
don't need to see.

00:00:25.860 --> 00:00:28.410
Right now, I'm in Datasheet view, so I'll
need to

00:00:28.410 --> 00:00:30.410
switch to Design view.

00:00:30.410 --> 00:00:32.270
There are two ways of doing that.

00:00:32.270 --> 00:00:35.140
You can either go to the View drop-down arrow
and

00:00:35.140 --> 00:00:37.480
select Design view,

00:00:37.480 --> 00:00:42.770
or in the bottom-right corner,
you can click the icon on the far right.

00:00:42.770 --> 00:00:45.410
In the data grid, there is a sort row, which
is

00:00:45.410 --> 00:00:47.120
currently empty.

00:00:47.120 --> 00:00:49.390
To add a sort you can just click on the cell
for

00:00:49.390 --> 00:00:51.390
the field you want to sort,

00:00:51.390 --> 00:00:54.530
and then click the
drop-down arrow to choose a sort option.

00:00:54.530 --> 00:00:57.720
Now, our results will be sorted alphabetically
by

00:00:57.720 --> 00:00:58.970
city.

00:00:58.970 --> 00:01:01.790
You can also do a multilevel sort by just
adding a

00:01:01.790 --> 00:01:04.470
sort to another field.

00:01:04.470 --> 00:01:07.190
A multilevel sort will always work from left
to

00:01:07.190 --> 00:01:08.190
right,

00:01:08.190 --> 00:01:12.829
so this is going to sort first by city, and
then within each city it will sort by zip

00:01:12.829 --> 00:01:13.890
code.

00:01:13.890 --> 00:01:16.790
If we wanted it to sort by zip code first,
then we

00:01:16.790 --> 00:01:19.460
would have to change the ordering of the columns.

00:01:19.460 --> 00:01:21.280
And you can do that by clicking at the top
of a

00:01:21.280 --> 00:01:24.829
column and dragging it to the left or right.

00:01:24.829 --> 00:01:27.799
So this would sort first by zip code and then
by

00:01:27.799 --> 00:01:28.810
city.

00:01:28.810 --> 00:01:30.700
But that's not what I want, so I'm just going
to

00:01:30.700 --> 00:01:33.799
leave it where it was.

00:01:33.799 --> 00:01:36.909
Below the Sort row, there is a check box for
each

00:01:36.909 --> 00:01:37.909
field,

00:01:37.909 --> 00:01:41.100
and you can uncheck a box to hide the field
in the results.

00:01:41.100 --> 00:01:43.070
We're using the Phone Number field to filter
our

00:01:43.070 --> 00:01:44.090
results,

00:01:44.090 --> 00:01:48.450
but we don't actually need to see the
phone numbers, so I'll uncheck this.

00:01:48.450 --> 00:01:51.159
And I'm also going to hide the ID field.

00:01:51.159 --> 00:01:54.520
This is really just a way of making the results
easier to read

00:01:54.520 --> 00:01:57.939
by reducing the amount of
information that you have to look at.

00:01:57.939 --> 00:02:01.369
Now, we can Run the query again,

00:02:01.369 --> 00:02:04.469
and you can see that our results are sorted
by city,

00:02:04.469 --> 00:02:07.359
and within each city they're sorted by
zip code,

00:02:07.359 --> 00:02:10.020
and the Phone Number and ID fields are hidden

00:02:10.020 --> 00:02:36.190
so we can just focus on the
names and addresses.

