Dear Experts

SqlServer Table1 has data as follows

Sno-------date
1------01/01/2010
8------01/01/2010
1------02/01/2010
5------02/01/2010
2------18/01/2010
9------18/01/2010
3------18/01/2010
1------03/01/2010
6------03/01/2010

My questions are:

1) I want to display the SMALLEST Date into textbox1 which is 01/01/2010
2) I want to display the BIGGEST Date into textbox2 which is 18/01/2010
3) I want to display the BIGGEST SNO against date 18/01/2010 into textbox3 which is 9
4) I want to display total records against date 18/01/2010 into textbox4 which is 3


Please help

How much help are you needing? If you're needing to know what SQL functions to use, that's simple. Min, Max, Count. If you need to know the full SQL statement(s) to use, how to connect to the database and retrieve the data and then display it on the screen, that's something else entirely!

Edit: I see from another one of your threads that you have some experience going to a database, so I'll just skip to the SQL.

Select min(date) as MinimumDate, max(date) as MaximumDate From Table1

Select max(Sno) From Table1 Where date = '2010-01-18'

Select count(*) From Table1 Where date = '2010-01-18'

Edited 6 Years Ago by apegram: n/a

This question has already been answered. Start a new discussion instead.