, .
:
word varchar(12),
a int,
b int,
c int,
...
w int,
z int;
a z , ,
, :
word, a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
anagram, 3,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0
, ,
:
select word, length(word) as wordlen
from dictionary
where
a <= 4 and
b <= 0 and
c <= 1 and
d <= 2 and
e <= 0 and
f <= 0 and
....
z <= 0
order by wordlen desc;
, .
, ( )
.
, ,