sql help

  • I have a table with CustomerId column(integer type) and a RegDate column(datetime type)

    I want to display a sql query which returns 1 row with 2 columns , one will be the count of the records in the table and other will contain the oldest datetime value from RegDate column

    Thanks

  • SELECT COUNT(*) AS NoOfRows, MIN(RegDate) AS OldestDate FROM Table

    /rockmoose


    You must unlearn what You have learnt

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply