sendou.ink/app/db/models/builds/countByUserId.sql
2023-04-23 13:26:18 +03:00

11 lines
161 B
SQL

select
count(*) as "count"
from
"Build"
where
"Build"."ownerId" = @userId
and (
"Build"."private" = 0
or "Build"."ownerId" = @loggedInUserId
)