# Show all (my, their, everyone's) uploads

**URL:** https://meta.discourse.org/t/show-all-my-their-everyones-uploads/37633
**Category:** Feature
**Created:** [8 בינואר,‏ 2016,‏ 12:57pm UTC](https://meta.discourse.org/t/show-all-my-their-everyones-uploads/37633 "2016-01-08T12:57:21Z")
**Posts on this page:** 1
**Page:** 2

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [22 במרץ,‏ 2016,‏ 9:16am UTC](https://meta.discourse.org/t/show-all-my-their-everyones-uploads/37633/21 "2016-03-22T09:16:32Z")

</div>

Just a tip, when you are joining tables, it is more readable to use the “`JOIN ... ON`” syntax

```sql
   SELECT CONCAT('<a href = "/p/', posts.id, '">', topics.title) AS html$post
        , CONCAT('<img src="', url, E'" style = "max-width: 100%\x3B">') AS html$Image
     FROM post_uploads
     JOIN uploads ON uploads.id = post_uploads.upload_id
     JOIN posts ON posts.id = post_uploads.post_id
     JOIN topics ON topics.id = posts.topic_id
    WHERE DATE(current_date) - DATE(uploads.created_at) < 7   
      AND topics.archetype = 'regular'
 ORDER BY uploads.created_at DESC

```

That way, you’re making it clear that you’re joining several tables and what columns you used.

[Previous page](https://meta.discourse.org/t/show-all-my-their-everyones-uploads/37633.md?page=1)
