aiosnfvuiawnvucniuvnr

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles Meta

Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles

-- 1: How many users didn’t complete their personal information? (only consider website url and location)-- 

/*SELECT COUNT(Id)
FROM Users
WHERE WebsiteUrl IS NULL OR LOCATION IS NULL

-- 2: How many users didn’t post any questions in year2015.(hint: use PostType table to check which post types is question)--

SELECT* 
FROM PostTypes -- Question = Id = 1

SELECT DISTINCT(PostTypeId)
FROM Posts
LEFT JOIN PostTypes on PostTypes.Id = Posts.Id
WHERE PostTypes.Id = 1
*/
-- WHERE Name = 'Question' AND CreationDate NOT BETWEEN '2015-01-01 00:00:00' AND '2015-12-31 11:59:59'

-- 3: How many post titles related to ‘sports’ without any accepted answer? --

SELECT Title, AcceptedAnswerId
FROM Posts 
WHERE Title like '%sports%' AND AcceptedAnswerId IS NULL 



-- 4: The user who created the most viewed posts in year 2023. What kind of badges does he/she own? -- 

-- 5: How many posts are voted as spam? ***From Vote Type figure out which Id is spam --



-- PIVOT TABLE -- FOR IS X-AXIS, GROUP BY XXX COLUMN -- IS X-AXIS

Enter Parameters

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