I would keep it simple as you have it, and change select to update in your example as follows:
q)update change:0^price-prev[price] by sym from trade
time sym price size change
-----------------------------------
09:30:00.000 a 10.75 100 0
09:31:00.000 a 11.75 100 1
09:32:00.000 a 13.2 100 1.45
09:30:00.000 b 100.75 100 0
09:31:00.000 b 106.95 100 6.2
09:32:00.000 b 123.95 100 17
Note, I’ve also used fill (^) here to set the first change value for each sym as 0; this is optional and you can leave it as null if you prefer.
For this query you are better using the ‘update’ query rather than ‘select’.
This will show you the updated trade table but it will not save it in place as the new trade table. If you want to save the new column to the trade table permanently then use trades in the update statement, i.e. update change:price-prev price by sym from trade
Here’s a link if you want to read more about the update statement.