Projet Sql

0

Please login or register to vote for this query.

(click on this box to dismiss)

Sports

Q&A for participants in team and individual sport activities

select u.id, count(p.owneruserid) as question, count(b.userid) as badges,
u.lastaccessdate
from users u
join posts p on p.owneruserid=u.id
join badges b on u.id=b.userid
where u.displayname='John Snow' and p.posttypeid='1'
group by u.id, u.lastaccessdate
order by u.lastaccessdate desc

Enter Parameters

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