home / berlin_first_names

Menu
  • GraphQL API

Name across All Districts for a Given Year

Custom SQL query (hide)

SELECT f.district, SUM(f.count) as count, t.total
  FROM first_names as f
         JOIN (SELECT district, SUM(count) AS total FROM first_names
                WHERE year = :year
                  AND gender = :gender
                GROUP BY district) t
             ON f.district = t.district
 WHERE name = :name
   AND year = :year
   AND gender = :gender
GROUP BY f.district

Query parameters

Edit SQL

0 results

Powered by Datasette · Queries took 0.922ms