ericbrunson
Technical User
I have the following schema:
Person
------
Person_id (pk)
Visit
------
Visit_id (pk)
Person_id (fk)
Visit_date
I need to select the date of each Person's last visit and at the same time calculate the amount of time since their last visit, if there was one.
Anyone got a clever query for that?
Person
------
Person_id (pk)
Visit
------
Visit_id (pk)
Person_id (fk)
Visit_date
I need to select the date of each Person's last visit and at the same time calculate the amount of time since their last visit, if there was one.
Anyone got a clever query for that?