Atrast visus postus, kuriem tagos ir gan “html”, gan “css”

0

Please login or register to vote for this query.

(click on this box to dismiss)

Genealogy and Family History Meta

Q&A about the site for expert genealogists and people interested in genealogy or family history

WITH RankedPosts AS (
    SELECT
        Users.Id AS UserId,
        Users.Location,
        Badges.Name AS BadgeName,
        Posts.Id AS PostId,
        Posts.CreationDate,
        ROW_NUMBER() OVER (PARTITION BY Users.Id ORDER BY Posts.CreationDate DESC) AS RowNum
    FROM
        Users,
        Badges,
        Posts,
        PostTypes
    WHERE
        Users.Id = Badges.UserId
        AND Users.Id = Posts.OwnerUserId
        AND Posts.PostTypeId = PostTypes.Id
        AND Users.Location LIKE '%Latvia%'
        AND Badges.Name = 'Editor'
        AND PostTypes.Name = 'Question'
)
SELECT
    UserId,
    Location,
    BadgeName,
    PostId,
    CreationDate
FROM
    RankedPosts
WHERE
    RowNum = 1
ORDER BY
    UserId ASC;

Enter Parameters

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