Use a questions result as a cte

I have a query in sql where i want to use the result in another query. So the {{#42}} i want to divide the result by another query.

Can you post an example ? Are you trying to do something like this ?

I to do a query where i divide the 965 which is called #if elyn orders and the 653 # of closed orders. Both of the numbers are sql queries in postgresql.

and with that i will make another query that will output a percentage