We look at the division of 974987 by 45 
The aim is to understand the frequency of 45 in 974987.

On to step 1:
45 goes into 9 0 times with a remainder of 9.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 9, we get 9.
Bring next digit (7) of the dividend behind the 9 and repeat the process: 97 / 45

Moving on to step 2:
If we divide 97 by 45, we get 2 and a remainder of 7.
Write down 2 as next digit of the result. 
Result so far: 2.0
If we take 90 away from 97, we end up with 7.
Append the next digit (4) from the dividend to 7 and continue with: 74 / 45

On to step 3:
When dividing 74 by 45, we get 1 with a remainder of 29.
Use 1 as the next digit of our solution. 
Result so far: 21.0
Subtract 45 from 74 to get 29.
Grab the next digit (9) from the dividend, add it to 29, then carry on: 299 / 45

Moving on to step 4:
45 can be fit into 299 6 times, resulting in a remainder of 29.
Record the quotient 6 as the next digit in the result. 
Result so far: 216.0
If we take 270 away from 299, we end up with 29.
Append the next digit (8) from the dividend to 29 and continue with: 298 / 45

On to step 5:
298 divided by 45 is 6 with a remainder of 28.
The number 6 becomes the next digit in our result. 
Result so far: 2166.0
If we subtract 270 from 298, we get 28.
Append the next digit (7) from the dividend to 28 and continue with: 287 / 45

Step 6:
If we divide 287 by 45, we get 6 and a remainder of 17.
Write down 6 as next digit of the result. 
Result so far: 21666.0
Subtracting 270 from 287 leaves us with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Step 7:
The number 45 fits into 170 3 times, leaving a remainder of 35.
Put 3 as the next digit of the answer. 
Result so far: 21666.3
Subtracting 135 from 170 leaves us with 35.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

Moving on to step 8:
The number 45 fits into 350 7 times, leaving a remainder of 35.
Record the quotient 7 as the next digit in the result. 
Result so far: 21666.37
Deduct 315 from 350 and we're left with 35.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

Moving on to step 9:
When dividing 350 by 45, we get 7 with a remainder of 35.
Write down 7 as next digit of the result. 
Result so far: 21666.377
The remainder is 35 after subtracting 315 from 350.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

In conclusion, the division gives 21666.377 with a balance of 0.0035.