firstnames for genders

0

Please login or register to vote for this query.

(click on this box to dismiss)

assumed first names from displayname of users active this year and other criteria, setup to extract by page number for export. It's a frikkin mess, don't look. lol Experimenting with PHP "Gender" Extension (https://www.php.net/manual/en/class.gender.php) ... needed some sample data to play with. :-) Total output was about 20 pages (1 million names)

Russian Language

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

select 

  case when CharIndex( ' ', displayname )=0 then displayname else
  Substring( displayname, 1, CharIndex( ' ', displayname ) - 1)
  end as firstname,
  count(*) cnt,
  avg(reputation) rep,
  avg(upvotes) upv,
  avg(downvotes) downv
from users
where LastAccessDate>='2019-01-01'
group by case when CharIndex( ' ', displayname )=0 then displayname else
  Substring( displayname, 1, CharIndex( ' ', displayname ) - 1)
  end
having charindex('.',case when CharIndex( ' ', displayname )=0 then displayname else
  Substring( displayname, 1, CharIndex( ' ', displayname ) - 1)
  end)=0 and len(case when CharIndex( ' ', displayname )=0 then displayname else
  Substring( displayname, 1, CharIndex( ' ', displayname ) - 1)
  end)>1
order by cnt desc

Enter Parameters

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