I have a table where I keep up the mutations in rooms and renting rooms for faculties.
the format of the table is
id
roomnr
client
startdate
enddate
area
now I want to make a grouping per client and per month what a client gained in area and what has diminshed
If I group on year-month of startdate I get nice the changes that started that month
but I also need to group the same time on the enddate
for example
room: 2e02
client: math
startdate: 12-01-2003
enddate: 14-02-2003
area: 40m2
I want to get the next result
2003-01 (group by year-month)
...
math 40m2
...
...
...
2003-02
...
...
math -40m2
...
...
so the same record is used twice in the result !! does anybody know how I can handle this ??
the format of the table is
id
roomnr
client
startdate
enddate
area
now I want to make a grouping per client and per month what a client gained in area and what has diminshed
If I group on year-month of startdate I get nice the changes that started that month
but I also need to group the same time on the enddate
for example
room: 2e02
client: math
startdate: 12-01-2003
enddate: 14-02-2003
area: 40m2
I want to get the next result
2003-01 (group by year-month)
...
math 40m2
...
...
...
2003-02
...
...
math -40m2
...
...
so the same record is used twice in the result !! does anybody know how I can handle this ??