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

12 lines
190 B
SQL

SELECT
"Teams".*
FROM
"Teams"
INNER JOIN
"TeamUsersSeasons" ON "TeamUsersSeasons"."teamId" = "Teams"."id"
WHERE
"TeamUsersSeasons"."seasonId" = ${seasonId}
GROUP BY
"Teams"."id"
;