SQL query for adding column value to compare with other column
I am not exactly familiar with Oracle syntax, but I know that Oracle supports indexes on functions.  I'm not sure if it will be used, since there is grouping involved, but you may wish to look into creating an index for this query if performance of the query becomes an issue.  A guess at the syntax used to create the index would be:

Create index net_qty on table_inventory(SUM(quantity + in_coming_qty) - SUM(locked_qty));


You can search for "Oracle function based index" for more information.