Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Sql max query

  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    160
    Thanks
    10
    Thanked 1 Time in 1 Post

    Sql max query

    Hi

    I normally use MySQL but have a query issue with SQL and wondered if anyone knows how to work it.

    I have a table called ODBC_ORDER_ALL and I need to generate a report of the account number and last order date.

    This table contains all orders for about 10 years by account number so I just need the unique account number and the last order date to come out.

    Table: ODBC_ORDER_ALL

    Field 1: ORDER_ACCOUNT_ID
    Field 2: ORDER_DATE

    Thanks in advance for you help.

    Roy

  • #2
    Regular Coder
    Join Date
    Jun 2011
    Posts
    103
    Thanks
    0
    Thanked 13 Times in 13 Posts
    are you trying to simply display the data from your table?

  • #3
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Check the manual for the GROUP BY statement.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •