top | item 34347085

(no title)

pophenat | 3 years ago

Well, if you have multiple queries, you'd still have to write the cte multiple times. You could also use views for the same thing, and those are much more reusable.

discuss

order

mcdonje|3 years ago

In that case, you might as well use tables. But a lot of people don't have write access for either tables or views.

preetamjinka|3 years ago

Yeah. In many cases I've had to use CTEs like this in BI tools. When you're experimenting with datasets for dashboards it's much faster to work with CTEs than to try to make production DB changes.