Looks like for Query 2 you are just trying to get one summary record per Name per Date, with the record containing a count of all records up to and including that date. That would look something like this -
Code:
SELECT DISTINCT T1.xName, T1.xDate, Count(*) As xRecords
FROM tblYourTable As T1, tblYourTable As T2
WHERE T1.xName = T2.xName
AND t1.xDate <= T2.xDate;
Hmmm. Might be more efficient to kill the dups before JOINING to the second copy, like this.
Code:
SELECT T1.xName, T1.xDate, Count(*) As xRecords
FROM (SELECT DISTINCT xName, xDate
FROM tblYourTable) As T1,
tblYourTable As T2
WHERE T1.xName = T2.xName
AND t1.xDate <= T2.xDate;
I'm sure there are several other variations that would meet your need, but try that second variation and see whether it gets you what you need. If it works, please mark the thread solved. If not, please report back with the issue.