SQL Queries

0

Please login or register to vote for this query.

(click on this box to dismiss)

Physics Meta

Q&A about the site for active researchers, academics and students of physics

-- Enter Query Title
-- Enter Query Description
--Select MONTH(CreationDate) MONTH, Count(CreationDate) count_records from Users where YEAR (CreationDate) >= '2010' GROUP BY MONTH (CreationDate) q2
--select count(*) users from users Q1
--select * from users where location = 'South Africa' order by reputation desc
--select * from badges where UserId =144424 and name = 'Enlightened' and date >='2016-01-01' and date <= '2016-12-31'
--select * from Posts where PostTypeId =1 and ownerUserId =6282 
--select * from users where displayname='Adriaan Stander'
--select top (2) * from users where id=6282
SELECT 
 YEAR(CreationDate) as Year,
 MONTH(CreationDate) as Month,
           COUNT(*) AS total
          
    FROM   Users
    WHERE  YEAR(CreationDate) >= '2010'       
    GROUP BY
           YEAR(CreationDate),
           MONTH(CreationDate)
           order by YEAR(CreationDate)

--SELECT u.Id,u.DisplayName,b.Name,b.Date 
--FROM 
--Users u 
--INNER JOIN 
--Badges b ON 
--u.ID = b.UserId
--WHERE 
--b.UserId =144424 AND b.Name = 'Enlightened'
--AND B.Date BETWEEN '2016-01-01' AND '2016-12-31'

Enter Parameters

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