Did you have a great time? vs Have you had a great time?

Difference between these two sentences:

“Did you have a great time?”

“Have you had a great time?”

.
The second enquiry refers to an adventure still in progress, or possibly very recently completed.
.

Wouldn’t that be “Are you having a good time” then?

.
Your sentence with the progressive only refers to an adventure still in progress.
.