Remix.run Logo
onlyrealcuzzo 2 hours ago

From what I gather, the most valuable feature is this: "2. Why does SQL double-count? (the "fan-out")"

But your example is not convincing this is a common enough problem to merit a library.

You have a table with cost that sums to 400. If you summed that table you'd get the same error. You don't need a fan-out JOIN to get the error...

That seems like bad database design, and creating a separate config file to mask the bad database design, rather than fixing the actual problem.

I think this could actually be useful, but I'd recommend a better example.

An OLAP table should be designed so that values can be summed if that's the purpose of the table. A relational table should be designed so that you don't have replicated bad data.

An OLAP table could have unintended many-to-ones, but it still shouldn't have this problem. Maybe I'm being naive, but I think the better solution is to fix the problem, not the queries.

You could get this problem, with a different example, but I'm not convinced this library is the best solution to that problem. Looker and DBT already mostly or completely solve it.

tejusarora an hour ago | parent [-]

[flagged]