Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find the least number

Status
Not open for further replies.

uravi

Technical User
May 26, 2003
3
IN
Hi all,

I have a table in postgres sql. It contains data like this

id date time
101 21-5 14:30
200 22-5 11:30
225 22-5 11:45

from this tabel I want to find out the least id, date & time also I want to find out the no of entries in that table in a particular time say 10:30 am every day and put an entry in a new table as like this:

23-5 10:30 3 101 21-5 14:30

if I use a while loop, I am able to find out the first 3 values but not the rest. Is there a possible way to find out all in single shot?

Can any one help.

Thanks
 
This sounds more like a sql based problem than a perl one. Are you sure you need to use perl for this, rather than just use plain SQL?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top