SQLite Forum

Help needed to return the right math results in sql query
Login
Different database, different data, but same end result: use alias to calculate results.

This works but it's probably ugly

```
select
	EG,
GPVBW/1000000-WG as Diff
from (
	select
		*,
		TID*0.003*250 as EG
		
from CalculateGrowth
)


```

But then I want to do another calculation based in the `Diff` column above:

Diff//0.003/250/750*60 as Delay

Do I need another sub-select or can it be within the existing one?