To give you a specific query for the results would require table and column names and specifics concerning their definitions. From the content of your question, it appears that you know the calculations necessary, you just need to plug in the column names for the variables you have listed. You’ll need to know the table and column to get share value for a given company, then with the input of number of shares, you can calculate transaction amount, broker value and total amount.
Presuming you have columns “sharevalue” and “sharename” in a table “stockinvestments”, You could issue the command: (also presuming the input of numshares and stockname as the input values)
select &&numshares * sharevalue as transamount,
.015*(&&numshares * sharevalue) as brokeramount,
1.015*(&&numshares* sharevalue) as totalamount
Pretty straight forward. I know there are various other methods to get the values, but this is simple and direct.