buellwinkle
Programmer
I have a SQL problem I can't figure out. It's a video store and people check out and check in videos. We want to know, what's the maximum of a certain video that was checked out. So for example, I check out a video, "The Terminator" at 9AM and watch it and check it back in at noon. Then another person comes in and checks it out at 1PM and checks it in at 5PM. So the maximum checked out for "The Terminator" is 1. But if another person checks out another copy at 11 AM and returned it at 5 PM, then the maximum checked out is 2.
The table layout is very simple, resource, customer, checkin_timestamp, checkout_timestamp.
Seems like an easy question to ask, just can't figure out how to do it.
The table layout is very simple, resource, customer, checkin_timestamp, checkout_timestamp.
Seems like an easy question to ask, just can't figure out how to do it.