mirror of
https://github.com/bitwarden/server.git
synced 2024-11-23 12:25:16 +01:00
33 lines
634 B
MySQL
33 lines
634 B
MySQL
|
CREATE OR ALTER PROCEDURE [dbo].[OrganizationUser_ReadOccupiedSmSeatCountByOrganizationId]
|
||
|
@OrganizationId UNIQUEIDENTIFIER
|
||
|
AS
|
||
|
BEGIN
|
||
|
SET NOCOUNT ON
|
||
|
|
||
|
SELECT
|
||
|
COUNT(1)
|
||
|
FROM
|
||
|
[dbo].[OrganizationUserView]
|
||
|
WHERE
|
||
|
OrganizationId = @OrganizationId
|
||
|
AND Status >= 0 --Invited
|
||
|
AND AccessSecretsManager = 1
|
||
|
END
|
||
|
GO
|
||
|
|
||
|
CREATE OR ALTER PROCEDURE [dbo].[ServiceAccount_ReadCountByOrganizationId]
|
||
|
@OrganizationId UNIQUEIDENTIFIER
|
||
|
AS
|
||
|
BEGIN
|
||
|
SET NOCOUNT ON
|
||
|
|
||
|
SELECT
|
||
|
COUNT(1)
|
||
|
FROM
|
||
|
[dbo].[ServiceAccount]
|
||
|
WHERE
|
||
|
OrganizationId = @OrganizationId
|
||
|
END
|
||
|
GO
|
||
|
|