How would you implement a query that selects every nth row, with NHibernate QueryOver, HQL or Criteria?
Currently I use the following T-SQL query:
SELECT * FROM (
SELECT *, ROW_NUMBER() OVER (ORDER BY Id) AS [Row]
FROM [TABLE_NAME]
) x WHERE (x.[Row] % 100) = 0
(Thanks to Marc Gravell)