求大神帮忙看看这个sql语句哪里有有关问题

求大神帮忙看看这个sql语句哪里有问题
需要查询当前日期前一天的30%的数据

select top((select COUNT (*) from(
SELECT ROW_NUMBER() OVER(ORDER BY c.ID DESC) AS ROWNUM,
cp.comname,t.taskcode,t.sendman,dt.tasktypename,z.zysj,z.createtime,c.customercode,
c.address,c.phonenumber
from zyhd_gdrqjmdhZyd z
LEFT JOIN task t ON z.rwdid=t.id
LEFT JOIN customer c ON t.customerid=c.ID
left join company cp on t.recievecom=cp.id
join dic_tasktype dt on t.tasktypeid=dt.tasktype
where 1=1)h where h.createtime = convert(varchar(50), getdate()-1,120))*(30/100)) * from(
SELECT ROW_NUMBER() OVER(ORDER BY c.ID DESC) AS ROWNUM,
cp.comname,t.taskcode,t.sendman,dt.tasktypename,z.zysj,z.createtime,c.customercode,
c.address,c.phonenumber
from zyhd_gdrqjmdhZyd z
LEFT JOIN task t ON z.rwdid=t.id
LEFT JOIN customer c ON t.customerid=c.ID
left join company cp on t.recievecom=cp.id
join dic_tasktype dt on t.tasktypeid=dt.tasktype
where 1=1
)h where h.createtime = convert(varchar(50), getdate()-1,120)
------解决方案--------------------
select top 30 percent * from 
(...) as t
where
   ...