I'm not a Database Administrator--just a Software Engineer. I would like to know if it is possible to reduce the following T-SQL query:
SELECT
SUM(Price * Quantity) as 'Total',
SUM(Price * Quantity) * 0.95,
FROM
SomeTables;
To something like this:
SELECT
SUM(Price * Quantity) as 'Total',
'Total' * 0.95,
FROM
SomeTables;
Note: This is just a sample to clarify/support my question. My current SQL query is larger and more complex than this.