🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #777

SQL Help

#777
From: Roy
Date: Thu, 12 Jul 2007 21:20
28 lines
1383 bytes
Hi,

I have an Interbase table with the following fields

START_DATETIME
TRAFFIC
ROUTE_NAME

I want to be able to retrieve the MAX(TRAFFIC) for a particular ROUTE_NAME 
on a particular day (0ne record for the day) ;

but the Select statement


SELECT START_DATE,ROUTE_NAME, MAX(TRAFFIC) from SYSTRAFFIC where 
START_DATETIME  = '2007/1/1'  GROUP BY
START_DATETIME,ROUTE_NAME


returns all values for the traffic for all the hours of the day (24 Records)

How can I achieve that.


Thanks very much for your help.

Rgds
Roy 
Technical Details
Message-ID: <46969c24@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,8f88f6177bf0b125,start
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Roy" <butcherr@candw.lc>
Newsgroups: borland.public.interbase.sql
Subject: SQL Help
Date: Thu, 12 Jul 2007 16:20:16 -0500
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 200.2.131.50
Message-ID: <46969c24@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1184275492 200.2.131.50 (12 Jul 2007 14:24:52 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail