About 50 results
Open links in new tab
  1. 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.

  2. sql - ORDER BY with multiple conditions? - Stack Overflow

    ORDER BY "order status" DESC, "discount status" ASC, "product type" DESC, "id" DESC Now, this is fine, but I need a particular type of order at the top of the list, which is orders that are both "order …

  3. sql - How to Order by multiple columns - Stack Overflow

    SELECT * FROM table_name ORDER BY [date] DESC ... whereby the dates from the 3 columns join to form one order, regardless of what column they are in. Hope that makes sense and thanks in advance.

  4. How do I order by multiple columns in a SELECT query?

    Apr 11, 2016 · 1 1 test1 2 1 3 2 test3 1 1 4 3 test4 3 1 Does any one have an idea about its sql query, i have tried a lot i'm not getting the result correct. can any one show me the exact sql query for this.

  5. sql - Multiple level ordering - Stack Overflow

    Apr 21, 2011 · I first want to sort based on rating limiting results to 20 and then on this resultset want to further apply sort based on name. I know to sort we need to use the query like Select * from table …

  6. T-SQL multiple order by clauses - Stack Overflow

    1 Order by essentially stacks. So if you have a clause like order by duration, arrival SQL will first try to order by duration, and then by arrival for each value of duration.

  7. sql ORDER BY multiple values in specific order? - Stack Overflow

    Ok I have a table with a indexed key and a non indexed field. I need to find all records with a certain value and return the row. I would like to know if I can order by multiple values. Example: ...

  8. Multiple "order by" in LINQ - Stack Overflow

    Here is why this can't work: The lambda expression in the parentheses is supposed to return a value which can be used to order the items: m.CategoryID is a number which can be used to order the …

  9. How to order by multiple columns in sql - Stack Overflow

    Jan 23, 2019 · I need help ordering my results, probably with a combination of case statements. Please see image showing existing output, conditions, desired output. Exhibited in Excel for ease, but …

  10. sql - partition by multiple expressions - Stack Overflow

    row_number() over (partition by sellerid,salesid order by qty asc) as row Then how partition by would create partition using multiple expressions?