exploring

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers Meta

Q&A about the site for Drupal developers and administrators

SELECT '1' as [Test], Id, COUNT(*) as [VoteCount] 
FROM Votes 
GROUP BY Id
ORDER by COUNT(*) DESC
--FETCH FIRST 20 ROWS ONLY
--UNION
--SELECT 2 as [Test], Id, COUNT(*) as [VoteCount] FROM Votes 
--ORDER by COUNT(*) DESC
--OFFSET 1*20 ROWS
--FETCH FIRST 20 ROWS ONLY

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results