Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Query to get Max (Date)

Re: SQL Query to get Max (Date)

From: Mike Haig <zzz_at_postmaster.co.uk>
Date: 7 Feb 2002 09:33:57 -0800
Message-ID: <ea1237b2.0202070933.1f1c052a@posting.google.com>


Sorry, I didn't explain myself fully in my first posting. This is the full query I'm running -- at the bottom is the result I'm expecting..

Thanks!
Tony


SELECT 	DISTINCT
		RTRIM(DMSG.FORUMNAME) AS TOPICS,
		RTRIM(DMSG.ADMINSMTPADDRESS) AS ADMINSMTP,
		RTRIM(DMSG.GROUPNAME) AS
		DFGROUP,
		RTRIM(DMSG.AUTHORSMTPADDRESS) AS AUTHORSMTP,
		MAX(DMSG.CREATED) AS LASTPOSTED
FROM 		DISCUSSIONMESSAGES
		DMSG,
		DISCUSSIONGROUP DFG,
		DISCUSSIONFORUM DF
WHERE		DF.ADMINSMTPADDRESS=DMSG.ADMINSMTPADDRESS AND
		DF.NAME=DMSG.FORUMNAME AND
		DFG.ACCESSLEVEL='all' AND 
		DMSG.INTRANETNAME='EMEAGWW' AND 
		DMSG.SERVICE='Discussionboards' AND
		DMSG.DOCFUNCTION='Discussionboards' AND 
		DMSG.GROUPNAME='Creative101'
GROUP BY 	DMSG.FORUMNAME, 
		DMSG.ADMINSMTPADDRESS, 
		DMSG.GROUPNAME, 
		DF.ADMINSMTPADDRESS, DMSG.CREATED


And the result should be as follows

AUTHORSMTP | TOPICS | LASTPOSTED Received on Thu Feb 07 2002 - 11:33:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US