
Order by is a great statement to use if you want your data sorted ascendingly or descending.
If you have a sales table with a several fields and want only list of customers and sales value arranged alphabetically by customer name, the code would be:
SELECT Customers, Sales_Value
FROM Sales
ORDER BY First_Name ASC
Equally you might want to order the data descending by the highest sales value, in this case you will use the below code:
SELECT Customers, Sales_Value
FROM Sales
ORDER BY Sales_Value
#AnalyticsDrivenStratege #DataAnalytics #DataEngineering #DataScience #DataManipulation #DataCleansing #coding #SQL
Follow my Blog via Email
Enter your email address to follow this blog and receive notifications of new posts by email.
Note: I try to use photos from free resources as much as I can. Hope that this will help artists getting their names out there. Photo by Fabricio Trujillo from Pexels