I have a problem that I know that i should be able to code up but have drawn a blank due to it being monday. Anyway......
Have a table :
create table test_registrations
user_name1 varchar (255),
user_address1 varchar (255),
If i have a number of registrations on a particular date then I can tell all how many users have registered in any date by :
select date_maint , count (1)
group by date_maint
order by date_maint desc
The qestion is how can I keep a total registared users count. Say if I have 10 users join on the 1st of Jan and 15 on the 3rd then I want
the total users for the users on 1st to read 10 and total users on the 3rd to read 25.
I know i should be able to code this up but I'm being a dumb ass. Can someone show me a way to code it. Is it some sort of correlated sub query to keep a running total ?
convert(varchar(10),date_maint,101) <= convert(varchar(10),b.date_maint,101)
Try this ... am not sure whether it will work or not ... not near a server right now to test the query