CrazyEngineers
  • Find Max Value From Multiple Columns In Table Using SQL

    karan20m

    Member

    Updated: Oct 26, 2024
    Views: 1.2K
    query to find the max no from multiple column in a table.?
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Abhishek Rawal

    MemberJun 29, 2013

    Kindly elaborate the question.With the Title Name & details you've given, we can't really understand the query.
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorJun 29, 2013

    #-Link-Snipped-# : Please avoid making assumptions that the reader will know what you want. Right now, we don't know if you are talking about MySQL or Excel or some other type of database and what kind of data is present in the table.

    Take a minute to elaborate your questions so that there's no room for assumptions and the reader exactly understands your question. That helps others help you.
    Are you sure? This action cannot be undone.
    Cancel
  • karan20m

    MemberJun 30, 2013

    it is for SQL
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorJun 30, 2013

    ELECT
        CASE
            WHEN Date1 >= Date2 AND Date1 >= Date3 THEN Date1
            WHEN Date2 >= Date1 AND Date2 >= Date3 THEN Date2
            WHEN Date3 >= Date1 AND Date3 >= Date2 THEN Date3
            ELSE                                        Date1
        END AS MostRecentDate
    Source: #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • karan20m

    MemberJul 2, 2013

    thnx
    Are you sure? This action cannot be undone.
    Cancel
  • Neeraj Sharma

    MemberJul 2, 2013

    karan20m
    thnx
    Please avoid using SMS languages and write complete words.

    Can you also elaborate your use case for this requirement? It will help us better understanding your needs and in turn help you efficiently.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register