I am unable to combine two SQL queries into a single one which reflects some great ideas.
Assume that I have a query A, and query B. Query A returns the total number of working hours. Query B returns the total number of hours where workers could work.
I just want query A over query B. I need to have the information of the percentage of capacity that was worked.
I can write query A and B independently, but I am unable to figure out the prewritten queries to come up with a new SQL query that uses them together. So tell me how can I write that query.