About 6,850,000 results
Open links in new tab
  1. php - What does DESC do in SQL? - Stack Overflow

    Jul 4, 2012 · 1 ORDER BY XXX DESC orders the results in descending order, as opposed to in ascending order ( ASC).

  2. Case expression for Order By clause with Desc/Asc sort

    Case expression for Order By clause with Desc/Asc sort Asked 11 years, 2 months ago Modified 10 months ago Viewed 46k times

  3. sql - Make nulls come last when sorting ascending - Stack Overflow

    I have a SQL table with a datetime field that can be null. What is a simple way to sort query results ascending by datetime, but with rows where datetime is null at the end, not at the …

  4. sorting - SQL multiple column ordering - Stack Overflow

    Jan 12, 2010 · How can I sort multiple columns in SQL and in different directions? For instance, 'column1' would be sorted descendingly and 'column2' ascendingly.

  5. sql - Order by descending date - month, day and year - Stack …

    SELECT * FROM vw_view ORDER BY EventDate DESC It gives me the date ordered by month and day, but doesn't take year into consideration. for example:

  6. sql - Order results by COUNT without GROUP BY - Stack Overflow

    SELECT Group, COUNT(*) FROM table GROUP BY Group ORDER BY COUNT(*) DESC The DESC keyword allows you to show the highest count first, ORDER BY by default orders in …

  7. New to SQL. ORDER BY, DESC and LIMIT query - Stack Overflow

    Sep 15, 2023 · Beginner in SQL and I want to return the top 200 results from a specific column and keep all the rows in order. Is this correct SELECT * Column name FROM Table name …

  8. mysql - How to group by DESC order - Stack Overflow

    MySQL supports GROUP BY col1 ASC/DESC. But this syntax was removed in MySQL 8.0 and alternative is GROUP BY col1 ORDER BY col1 ASC/DESC. See my answer.

  9. sql - Count, order desc and select top 5 - Stack Overflow

    Jan 25, 2016 · 8721, database Our goal is to count up all tickets belonging to each type (so in this case the result should be 3 hardware, 2 software, 2 network, 1 telephone and 1 database …

  10. sql - MySQL - using GROUP BY and DESC - Stack Overflow

    Feb 9, 2015 · In my SQL query I am selecting data with GROUP BY and ORDER BY clauses. The table has the same numbers across multiple rows with different times in each row. So I think I …