至于统计该工程师某一天所参与的项目工时的sql语句可以这么写:
select project,case when nums is null then '0' else nums end as nums from (select * from tb_pj_project where id = [showuserid] ) a left join (select project as wproject,sum(worktime) as nums from TB_PJ_WORKS where [日期] = [日期] group by project ) b on a.project = b.wproject order by project