SELECT [Id], [TenantId], [ListingId], [ListingName], [ListingSlug], [ListingSummary], [SubmissionNotes], [SubmittedBy], [SubmittedAtUtc], [Status], [ReviewerEmail], [ReviewerNotes], [CreatedAtUtc], [UpdatedAtUtc], [ResolvedAtUtc]
FROM [dbo].[MarketplaceListingReviews]
WHERE (@Status IS NULL
   OR [Status] = @Status)
  AND (@TenantId IS NULL
   OR [TenantId] = @TenantId)
ORDER BY [Status],
    [SubmittedAtUtc] DESC
OFFSET 0 ROWS FETCH NEXT COALESCE(@Limit, 2147483647) ROWS ONLY;
