domsPlace/private/database/queries/team/GetTeamBySeasonAndUser.sql

11 lines
211 B
SQL

SELECT
*
FROM
"Teams"
INNER JOIN
"TeamUsersSeasons" ON "TeamUsersSeasons"."teamId" = "Teams"."id"
WHERE
"TeamUsersSeasons"."userId" = ${userId} AND
"TeamUsersSeasons"."seasonId" = ${seasonId}
LIMIT 1;