WITH t1 AS (SELECT TOP 100 * FROM Posts ) SELECT t...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Chinese Language

Q&A for students, teachers, and linguists wanting to discuss the finer points of the Chinese language

--SELECT TOP 100 *
--FROM Users
--WHERE LOWER(Location) LIKE '%latvia%'

--SELECT Location, COUNT(Id) loc_count
--FROM Users
--WHERE LOWER(Location) LIKE '%latvia%' OR Location LIKE '%Riga %' OR Location LIKE '%Rīga %' OR Location LIKE '%Riga,%'
--GROUP BY Location
--ORDER BY loc_count DESC

--WITH valid_users AS
--(SELECT 

--SELECT Users.Id, COUNT(Badges.Id) AS badge_count
--FROM Users
--INNER JOIN Badges
--ON 
--Users.Id = Badges.UserId
--WHERE LOWER(Location) LIKE '%latvia%' OR Location LIKE '%Riga %' OR Location LIKE '%Rīga %' OR Location LIKE '%Riga,%'
--GROUP BY Users.Id
--HAVING COUNT(Badges.Id) > 100
--ORDER BY COUNT(Badges.Id) DESC;

--WITH lv_users AS
--(SELECT Users.Id AS user_id, Badges.Id AS badges_id
--FROM Users
--INNER JOIN Badges
--ON Users.Id = Badges.UserId
--WHERE LOWER(Location) LIKE '%latvia%' OR Location LIKE '%Riga %' OR Location LIKE '%Rīga %' OR Location LIKE '%Riga,%'
--)

--SELECT user_id, COUNT(badges_id) AS badge_count
--FROM lv_users
--GROUP BY user_id
--HAVING COUNT(badges_id) > 100
--ORDER BY badge_count DESC

WITH t1 AS
(SELECT TOP 100 *
FROM Posts
--INNER JOIN PostNotices
--ON Posts.Id = PostNotices.PostId
)

SELECT t1.*, PostNotices.*
FROM t1
INNER JOIN PostNotices
ON t1.Id = PostNotices.PostId

Enter Parameters

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