ayyjohn
DTDrizzle Team
•Created by ayyjohn on 12/30/2024 in #help
how to nest select statement to achieve aliased result
if I have a basic
findMany
with nested relations and the following schema
* users create reviews (as reviewer)
* reviews are of a performance
* performances are by an artist
* performances are at a venue
that returns the data like
and i'm trying to perform an aggregation to get the top 10 reviews created in the the last 10 days with the most comments
which almost gives me back the same data shape, but it won't let me nest artist and venue info under performance.
is there a way to update my joins or my select statement so that the shape will be the same as the relational query?23 replies