Can I create a use a derived table in the subquery rather in the CTE?

Knowledge Drop

Last tested: Jan 21, 2019

Yes you can. Actually this will not be a derived table any more, but the query will be faster. So how do I do that?

The trick is with `sql_table_name`!

Instead of using a table name in the `sql_table_name`, write the full subquery there, then define all the dimensions and measures as usual. The generated sql will be a subquery.

This content is subject to limited support.                

Version history
Last update:
‎05-07-2021 09:48 AM
Updated by: