How To Get The Order Id On The Product Page?

I'm trying to show a url to purchased item, I need to get the order id of the purchased product on the product page?

Thanks in advance

There is no easy way to do it. Additional requests to database are required

Help me with it please