Solana Top Questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Open Data

Q&A for developers and researchers interested in open data

WITH TopPosts AS (
    SELECT TOP(300) Id, ViewCount, Title, Body, Score, CreationDate, Tags, AnswerCount, CommentCount, FavoriteCount
    FROM Posts
    WHERE PostTypeId = 1
    ORDER BY ViewCount DESC, Score DESC
)
SELECT 
    p.Id AS PostId,
    p.Title,
    p.Body,
    p.ViewCount,
    p.Score,
    p.CreationDate,
    p.Tags,
    p.AnswerCount,
    p.CommentCount,
    p.FavoriteCount,
    c.Id AS CommentId,
    c.Text AS CommentText,
    c.CreationDate AS CommentCreationDate,
    c.Score AS CommentScore
FROM 
    TopPosts p
LEFT JOIN Comments c ON p.Id = c.PostId
ORDER BY 
    p.ViewCount DESC, p.Score DESC, c.CreationDate;

Enter Parameters

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