# Query for recently uploaded / attached files

**URL:** https://meta.discourse.org/t/query-for-recently-uploaded-attached-files/60452
**Category:** Support
**Created:** [April 5, 2017, 1:30am UTC](https://meta.discourse.org/t/query-for-recently-uploaded-attached-files/60452 "2017-04-05T01:30:37Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [April 5, 2017, 1:23pm UTC](https://meta.discourse.org/t/query-for-recently-uploaded-attached-files/60452/3 "2017-04-05T13:23:00Z")

</div>

Yes. Here is a data-explorer query for that:

```sql
SELECT posts.id AS post_id,
       uploads.url
FROM post_uploads
JOIN uploads ON uploads.id = post_uploads.upload_id
JOIN posts ON posts.id = post_uploads.post_id
ORDER BY posts.created_at DESC

```

@Miro Install [discourse-data-explorer](https://github.com/discourse/discourse-data-explorer) plugin and import this query:

[post-with-uploads.dcquery.json](https://global.discourse-cdn.com/meta/original/3X/0/3/035854c9c39ab83cfdfddf3020f493d4b77a241e.json) (312 Bytes)

---

_[View the full topic](https://meta.discourse.org/t/query-for-recently-uploaded-attached-files/60452)._
