I have a SQL query that is something like
SELECT SUM(price) FROM budget GROUP BY {{PLACEHOLDER}}
where {{PLACEHOLDER}} will be replaced in the code. Is it possible to replace it by something that will result in the same output as the following statement?
SELECT price FROM budget
If you have a unique column, like an autogenerated id you can use that
will be equal to
if every row has a different budget_id (identity, autoincrement fields will fit the bill)
Now, I urge you to reconsider the wisdom of doing such a hack, why don’t you put an if where it matters?