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 TOP 20 '1' as [Test], Id, ViewCount 
FROM Posts 
ORDER by ViewCount DESC
--FETCH FIRST 20 ROWS ONLY
--OFFSET 25
--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