473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Latest Record in a Set

I have a table with these fields:

RequestId
Account
RequestDate
RequestDescription

I want to get a list of all accounts in the table along with ONLY their lastest request, ie something along the lines of:

select Account, RequestDate, RequestDescription where RequestDate = max(Request Date for that account)

I can't seem to get the syntax down.

Any help is appreciated.

Nov 13 '05 #1
2 1118
Sort by requestDate (DESCENDING) and then turn your select into a TOP
VALUES query. (see help.)

Nov 13 '05 #2
pi********@hotmail.com wrote:
Sort by requestDate (DESCENDING) and then turn your select into a TOP
VALUES query. (see help.)

This wouldn't work at all. I would have to already know how many unique account numbers were in the table, and even if
I did know it would return the most recent dates, not the most recent date for each individual account.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gleep | last post by:
Hey Guys, I've got a table called Outcomes. With 3 columns and 15 rows 1st col 2nd col 3rdcol outcome date price There are 15 rows...
9
by: Gleep | last post by:
sorry i didn't explain it correctly before my table is like this example fields: ID name username outcome date1 date2 date3 (etc..) - date15 price1 price2 price3 (etc..) I know that...
4
by: Henry | last post by:
Dear all, I am now designing a table for storing inventory of servers in a DB2 DB. However, I am new to SQL and would like to seek advice whether the design could work as expect with DB2 SQL. ...
3
by: John Davis | last post by:
I currently have a Table with these fields: Symbol; Price; Date with data that looks like this: IBM; 10; 10/15/2003 IBM; 11; 10/29/2003 GM; 20; 10/15/2003 F; 25; 9/15/2003
2
by: John Baker | last post by:
Hi: I have used this group a number of times simply because while the manuals for Access may show the technology, but most are really weak on how to apply it in special situations and the...
2
by: M.Stanley | last post by:
Hi, I have a problem..I'm doing a specific query where I'm joining fields from a table with appednded data (there are duplicate records, except for the date/time), and another query. I want the...
5
by: alanspamenglefield | last post by:
Hello group, I have an SQL statement which pulls data from a table as follows: " SELECT tblSites.sites_siteno, " & _ " tblSites.sites_sitename, " & _ " Sum(tblStockResults.stkr_result) AS...
1
by: mccax | last post by:
Hello, I have the following table (UNIQUOTE) with data in it: Opportunity_Id Rx_Combo Plan_Type B6FG3JX5G $27/$48/$28 HMO B6FG3JX5G $88/$33/$99 HMO B6FG3JX5G $16/$17/$18 HMO There is a...
0
by: Daniel Roy | last post by:
Here's what I came up with (sorry if it doesn't exactly match your example, but I could only work with the info you provided): SQLcreate table latest (person_id number not null, date_entry...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.