A subquery is a SELECT nested inside a clause of an outer statement, and it's commonly used to return values from specific columns, filter based on specific rows, or compare/combine values from different tables (e.g. inside a WHERE or FROM clause). Creating a brand-new table from the output of a SELECT is instead done with CREATE TABLE ... AS SELECT, which is a separate DDL operation, not what a subquery itself does.