3 ms·
> Fundamentally, SQL lacks meaningful abstraction, and there's no sane way to package very common operations. Tables are the unit of abstraction. You’re on th
by wilde 4y ago
> Fundamentally, SQL lacks meaningful abstraction, and there's no sane way to package very common operations.
Tables are the unit of abstraction.
You’re on the right track with your instinct that you should be able to pull repeated work into a reusable unit. In many DB systems you can just register these sub queries as views and treat them as real tables. In the ETL world that I’m typically working in, you go one step further and just write pipelines to make useful intermediate tables.
Reuse tables, not subqueries.