`
`Case 3:17-cv-05659-WHA Document 154-13 Filed 07/12/18 Page 1 of 2
`
`EXHIBIT 12
`
`
`
`7/3/2018
`
`SQL SORTING Results
`Case 3:17-cv-05659-WHA Document 154-13 Filed 07/12/18 Page 2 of 2
`
`
`
`SQL - SORTING Results
`
`Advertisements
`
`
`
` Previous Page
`
`Next Page
`
`
`
`
`The SQL ORDER BY clause is used to sort the data in ascending or descending order,
`based on one or more columns. Some databases sort the query results in an ascending
`order by default.
`Syntax
`
`The basic syntax of the ORDER BY clause which would be used to sort the result in an
`ascending or descending order is as follows −
`
`SELECT column-list
`FROM table_name
`[WHERE condition]
`[ORDER BY column1, column2, .. columnN] [ASC | DESC];
`
`You can use more than one column in the ORDER BY clause. Make sure that whatever
`column you are using to sort, that column should be in the column-list.
`Example
`
`Consider the CUSTOMERS table having the following records −
`
`+----+----------+-----+-----------+----------+
`| ID | NAME | AGE | ADDRESS | SALARY |
`+----+----------+-----+-----------+----------+
`| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
`| 2 | Khilan | 25 | Delhi | 1500.00 |
`| 3 | kaushik | 23 | Kota | 2000.00 |
`| 4 | Chaitali | 25 | Mumbai | 6500.00 |
`| 5 | Hardik | 27 | Bhopal | 8500.00 |
`| 6 | Komal | 22 | MP | 4500.00 |
`| 7 | Muffy | 24 | Indore | 10000.00 |
`+----+----------+-----+-----------+----------+
`
`https://www.tutorialspoint.com/sql/sql-sorting-results.htm
`
`1/4
`
`