


        Sorting in SQL,
        
        by default the result are retruned to you FIEST COME FISRT SERVED
        
        If your SELECT includes the primary key, the results will be sorted
        by ascending primary key
        
        If I want a differnt sort order, I need to specify that
        via:
        
        ORDER BY
        
        for example:
        SELECT * FROM world.continent
        ORDER BY code
        
        by default an ORDER BY is ascending (ASC) I can code that if I like
        I can also code DESC for decending
        
        I can hace a compound sort by adding commas
        
        for example:
        select * 
        from world.city
        ORDER BY country_code ASC,
         name DESC
         
           this will return sorted by country code, then within the country code
           the names are sorted in decending order
           
        I can sort by ANY column in the results, including a computed column
        
        for example:
        select id, total_amount, (total_amount * .15) 
        from customer.orders
         order by 3  <- this will sort by results columns #3
         
       select id, total_amount, (total_amount * .15) 
       from customer.orders
        order by (total_amount * .15) 


        I can also sort by a column not in the results
        for example:
        select id, total_amount 
        from customer.orders
         order by order_date
