Here's a fresh way to solve this problem:
How many $1$-digits are there? largest - smallest + 1: or 9 - 1 + 1 = 9.
What is the total number of digits contributed by $1$-digit numbers? $1 \cdot 9 = 9$
How many $2$-digit numbers are there? $99 - 10 + 1 = 82$
What is the total number of digits contributed by $2$-digit numbers? $2 \cdot 82 = 164$
How many $i$-digit numbers are there? $10^{i-1} - 10^i$.
So how many digits are contributed in the $i$-digit numbers?
$i (10^{i-1} - 10^i)$.
How many total digits are contributed by all $6$-digit numbers (i.e., up to 999,999)?
$\sum\limits_{i=1}^6 i (10^i - 10^{i-1}) = 5,888,889$.
How many digits are contributed up to $1,000,000$? We merely add the seven digits of $1,000,000$, thus: $5,888,896$.
Each of the nine digits $1, \ldots, 9$ appear 600,000 times in that list, except $1$ which appears one more (from its appearance in $1,000,000$).
The remaining digits must be $0$s:
$\left(\sum\limits_{i=1}^6 i \left(10^i-10^{i-1}\right)+7\right)-9 \cdot 600000-1 = 488,895$.
Verified by Mathematica:
Counts[Flatten[IntegerDigits /@ Range[{1, 1000000}]]]
(*
<|1 -> 600002, 2 -> 600000, 3 -> 600000, 4 -> 600000, 5 -> 600000,
6 -> 600000, 7 -> 600000, 8 -> 600000, 9 -> 600000, 0 -> 488895|>
*)