J
Joe Cilinceon
I'm trying figure out a query or series of queries to give me data on units
we collected rent on more than once in a month. To help explain this a
little better we rent storage units. Now we prorate (charge by the day) the
first months rent, but after that we charge for full months with no refunds
on partial months used. In other words, if you vacate on the 15th of a month
and have paid for the month you get no refund on the unused portion of the
rent for that month. You would get a refund on unused months paid in
advance however.
With that said, we will often rent a unit again after a vacate under the
above circumstances. This is what I'm looking for is how many times it
happens in a given month. The table I figure will have that data is the
Lease table, the structure is show below:
LEASES
ledgerid (account #)
custno (renter)
unit (unit # rented)
startdate (date it was rented on)
enddate (date of vacate)
paidthru (date it was paid thru)
Now if the unit is still rented the enddate is a Null value, startdate will
always have a date. I hope that is clear, it was tough to explain.
we collected rent on more than once in a month. To help explain this a
little better we rent storage units. Now we prorate (charge by the day) the
first months rent, but after that we charge for full months with no refunds
on partial months used. In other words, if you vacate on the 15th of a month
and have paid for the month you get no refund on the unused portion of the
rent for that month. You would get a refund on unused months paid in
advance however.
With that said, we will often rent a unit again after a vacate under the
above circumstances. This is what I'm looking for is how many times it
happens in a given month. The table I figure will have that data is the
Lease table, the structure is show below:
LEASES
ledgerid (account #)
custno (renter)
unit (unit # rented)
startdate (date it was rented on)
enddate (date of vacate)
paidthru (date it was paid thru)
Now if the unit is still rented the enddate is a Null value, startdate will
always have a date. I hope that is clear, it was tough to explain.