Hi to all,
My question is if it is possible in teradata sql to have a rank or a sum until a value is reached and then start again the rank or the sum.
I have 2 Tables: In one are parking house id's and haw many place are free. In the other table are customers id's and they have a number of cars.
What i have to do is to order the cars in the parking house.
park_id || free_places
customer_id || nr_of_cars
so i would need to build a cumulativ sum over the nr_of_cars until i reach the number of free places in the first parkinghouse and then start again for the second parking house and so on. Is also wished that the parkings are filled as evenly as possible. Another condition is that one customer schould be able to park all his cars in the same parkingplace.
Is this in teradata possible?
Thank you and a good day