Code Submission 3

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS

Q&A for administrators, end users, developers and designers for Craft CMS

SELECT 
    COUNT(Id) AS num_posts,
	MIN(CreationDate) AS min_date,
	MAX(CreationDate) AS max_date,
    AVG(score) as avg_num_posts
FROM posts

SELECT Name, count(*)
from badges
group by Name
HAVING count(*)>20;


SELECT Id, DisplayName, Location
from Users where Location  = 'New York, NY, United States' OR Location =  'New York, NY';


SELECT
year(CreationDate) as YEARS,
month(CreationDate) as MONTHS, 
count(*) as Frequency
From Posts
group by month(CreationDate), year(CreationDate)
order by year(CreationDate) ASC, month(CreationDate)

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results