21.6. More SELECT KeywordsΒΆ

So far we have covered selecting the data from all fields from a table, from just one specified field, and from a list of fields.

There are other keywords that you can use with SELECT. Run the following to see what they do.

Run the following to see what COUNT and LIMIT do.

Run the following to see what MAX does

Run the following to see what ORDER BY does

Run the following to see what ORDER BY does

Given a database of bike share information write a SELECT statement to retrieve the bike_number and duration from table trip_data but order the data by bike_number in descending order and limit the number of items returned to 5.

What happens if you try to limit the number of items returned before you specify how to sort the data in the SQL above?

You have attempted of activities on this page