# Top 50 Größte Uploads fehlerhaftes script

**URL:** <https://meta.discourse.org/t/top-50-largest-uploads-broken-script/284017>\
**Category:** Bug\
**Tags:** data-explorer\
**Created:** [31. Oktober 2023 um 14:58 UTC](https://meta.discourse.org/t/top-50-largest-uploads-broken-script/284017 "2023-10-31T14:58:42Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)\
**Post date:** [31. Oktober 2023 um 14:58 UTC](https://meta.discourse.org/t/top-50-largest-uploads-broken-script/284017/1 "2023-10-31T14:58:42Z")

</div>

Manchmal verwende ich ein Explorer-Skript, um große Uploads zu finden.

Wenn ich versuche, die Abfrage auszuführen

```sql
SELECT posts.id AS post_id,
    uploads.original_filename,
    ROUND(uploads.filesize / 1000000.0, 2) AS size_in_mb,
    uploads.extension,
    uploads.created_at,
    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 uploads.filesize DESC
LIMIT 50

```

erhalte ich eine Meldung:

```plaintext
PG::UndefinedTable: ERROR: relation "post_uploads" does not exist
LINE 13: FROM post_uploads
              ^

```

Für diejenigen, die dieses Thema in Zukunft finden werden, es bezieht sich auf [Search attachments by storage name](https://meta.discourse.org/t/search-attachments-by-storage-name/209945)

---

_[View the full topic](https://meta.discourse.org/t/top-50-largest-uploads-broken-script/284017)._
