May 2020
Beginner
564 pages
14h 9m
English
Let's say you wanted to sort on more than one column. To do this, you should place the columns you want to order by in the ORDER BY clause in the order in which you want them ordered. For instance, if you wanted to order by playerid, then g_all, you can execute the following query:
USE lahmansbaseballdb;SELECT playerid, g_all, g_batting, g_defense FROM appearancesORDER BY playerid, g_all;
The previous query will give you the results shown in the following screenshot:

As shown in the previous screenshot, the results are now ordered by ascending playerid, then g_all. ...
Read now
Unlock full access