Space Cowboy
Member
- Local time
- Today, 14:26
- Joined
- May 19, 2024
- Messages
- 245
SELECT top 6 odate, hid
FROM rf1
ORDER BY hid, odate DESC
I have restricted the size of this query by generation of a "supply" query rf1 and narrowed it down to 700,000 rows. Large due to varying numbers of order dates for each "hid" so have restricted to this decade.
The above select works, giving the six most recent order dates, but only on the first "hid" and not all of the order id's in the field.
FROM rf1
ORDER BY hid, odate DESC
I have restricted the size of this query by generation of a "supply" query rf1 and narrowed it down to 700,000 rows. Large due to varying numbers of order dates for each "hid" so have restricted to this decade.
The above select works, giving the six most recent order dates, but only on the first "hid" and not all of the order id's in the field.
Last edited: