New help with SQL Server select statement
- by gio_333m
I need help with select statement in SQL Server / T-SQL
My table looks like this:
Id (int)
QuestionId (int)
GenreId (int)
I want to select random N rows from this table so that maximum number of same GenreId in the result set is less than X for all GenreId-s except one. For that one GenreId, I need row count with that GenreId to be equal to Y.