is it better to wrap an sqlselect in an sqlsubselect, or is it better to have the subselect be a child of the select? I see you do it both ways.
 Both methods of including a subquery in an SQL statement (using a subselect within a SELECT clause or using a subquery within a FROM clause) are generally equivalent in terms of performance and can be used interchangeably in many cases. However, there are some situations where one method might be more appropriate than the other.

Using a subselect within a SELECT clause can be more concise and easier to read, especially when the subquery only returns a single value. For example:
```vbnet
SELECT name, (SELECT AVG(score) FROM scores WHERE scores.student_id = students.id) as average_score
FROM students;
```
In this example, the subquery calculates the average score for each student and is included within the SELECT clause using parentheses.

On the other hand, using a subquery within a FROM clause can be more powerful and flexible, especially when the subquery returns multiple rows or columns. For example:
```vbnet
SELECT students.name, scores.score
FROM students
JOIN (
  SELECT student_id, AVG(score) as average_score
  FROM scores
  GROUP BY student_id
) as scores
ON students.id = scores.student_id
WHERE scores.average_score > 90;
```
In this example, the subquery calculates the
In SQL, there are often multiple ways to write a query, and the choice between wrapping an `SQL SELECT` in an `SQL SUBSELECT` or having the subselect as a child of the select depends on various factors. Here are some considerations to help you decide:

**Wrapping an `SQL SELECT` in an `SQL SUBSELECT` (derived table):**
```sql
SELECT *
FROM (
  SELECT column1, column2,...
  FROM table_name
  WHERE condition
) AS subquery
WHERE subquery_condition;
```
**Pros:**

1. **Readability**: The subquery is clearly separated from the outer query, making it easier to understand the logic.
2. **Flexibility**: You can use the derived table as a temporary result set, which can be useful when you need to perform additional operations on the result.
3. **Performance**: In some cases, the database optimizer might be able to optimize the subquery more efficiently when it's wrapped in a derived table.

**Cons:**

1. **Performance overhead**: Creating a derived table can introduce additional overhead, especially for large result sets.
2. **Limited indexing**: The derived table might not be able to use indexes on the underlying table, which can impact performance.

**Having the subselect as a child of the select (inline subquery):**
```sql
SELECT *
FROM table_name
WHERE column1 IN (SELECT column1 FROM table_name WHERE condition);
```
**Pros