SELECT i.[Id],
       i.[WorkspaceId],
       i.[Email],
       i.[RoleIds],
       i.[Token],
       i.[CreatedAt],
       i.[Accepted],
       w.[Id] AS WorkspaceSplit,
       w.[Id],
       w.[TenantId],
       w.[Name],
       w.[InviteTokenTtl],
       w.[InviteAcceptBaseUrl],
       w.[InviteEmailSubjectTemplate],
       w.[InviteEmailBodyTemplate]
FROM [dbo].[WorkspaceInvites] AS i
    JOIN [dbo].[Workspaces] AS w
ON w.[Id] = i.[WorkspaceId]
WHERE i.[Token] = @Token;
