How to do particular Query


Iโ€™m trying to implement a view of the history an NFT has had, i.e when it was minted, what offers have been made, accepted, when it was sold, etc.

I have a table for each of these transactions. For example, I have an OffersPlaced table, an OffersAccepted table, a ListingCanceled table, etc. All these tables get populated from watching associated smart contract events.

I was thinking of querying each table for the rows pertaining this particular nft, and then joining them all and sorting them by timestamp.

Does this approach make sense? I feel like this is a very common usecase for NFT platforms, so thereโ€™s probably a standard solution. How can I do this?


It is possible If you have all the event data synced to the database. You can do a live query of the data from the database and show it in your app.