pudgereyem
DTDrizzle Team
•Created by pudgereyem on 1/31/2024 in #help
Is there a way I can create a temporary table with custom data which I then can reference?
I'm building a chat application where I have a model
threads
and activities
. I'm also keeping track of what the latest activity
a specific user has read. This allows me to calculate the "number of unread messages". I would like to query the number of unread messages per thread in one database query. I'm using Postgres.
Below is my code, please note that the .with()
method is broken. But I wanted to paint a picture of what I wanted to do.
Thanks in advance,
Victor3 replies