Python, 245 256
import sys
def t(n,l):return sum(map(lambda x:int(x**0.5+0.5)**2==x,[int(n[i:j+1])for i in range(l)for j in range(i,l)if n[i]!='0']))/float(l)
print max(map(lambda x:(x,t(str(x),len(str(x)))),range(*map(int,sys.argv[1:]))),key=lambda y:y[1])[0]
- 256 → 245: Cleaned up the argument parsing code thanks to a tip from Keith RandallKeith Randall.
This could be a lot shorter if the range were read from stdin
as opposed to the command line arguments.
Edit:
With respect to the bonus, my experiments suggest the following:
Conjecture 1. For every n ∈ ℕ, the number in ℕ≤n with the largest SNDD must contain solely the digits 1, 4, and 9.
Conjecture 2. ∃ n ∈ ℕ ∀ i ∈ ℕ≥n : SNDD(n) ≥ SNDD(i).
Proof sketch. The set of squares with digits 1, 4, and 9 are likely finite. ∎