# Data explorer challenge: Generate list of members by location

**URL:** <https://meta.discourse.org/t/data-explorer-challenge-generate-list-of-members-by-location/55648>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [2017 年1 月 12 日 15:11 UTC](https://meta.discourse.org/t/data-explorer-challenge-generate-list-of-members-by-location/55648 "2017-01-12T15:11:45Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

作者： ![DonH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/donh/32/274040_2.png) [@DonH](https://meta.discourse.org/u/DonH)\
发布日期： [2023 年7 月 17 日 00:17 UTC](https://meta.discourse.org/t/data-explorer-challenge-generate-list-of-members-by-location/55648/6 "2023-07-17T00:17:37Z")

</div>

也许我不明白这个问题，但如果我明白了，那么

```sql
SELECT u.username
    FROM users u
    LEFT JOIN user_profiles up ON u.id = up.user_id
    WHERE location = 'Pakistan'

```

或者，同样地，

```sql
SELECT username from user_profiles, users
where user_id = id and location = 'Pakistan'

```

请注意，数据浏览器不接受双引号作为分隔符。

---

_[View the full topic](https://meta.discourse.org/t/data-explorer-challenge-generate-list-of-members-by-location/55648)._
