Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • position is in table places, as the creation script shows. Commented Jul 13, 2021 at 10:37
  • My issue with your suggestion is that I need the joins to find the IDs in the first place, because I need to restrict by language and then match name, administration etc, which all sit in different tables. Furthermore, I need both the records themselves and some aggregates (each one of the two inner queries); even if I got the IDs with a further subquery I would then have to copy this subquery twice to get both sets of results, right? The reason I have a LIMIT without an ORDER BY is that ordering all the results in the innermost subqueries takes a lot of time. Commented Jul 13, 2021 at 10:43