第一题: select record_date, sum(case when result='win' then 1 else 0 end) win, sum(case when result='fail' then 1 else 0 end) fail from winfail group by record_date 第二题: select t.t_name name, sum(a.price) cost from teacher t inner join (select b.b_id, b.b_price price, s.t_id from book b inner join schedule s on b.b_id = s.b_id) a on t.t_id = a.t_id where t.t_title = 'lecturer' group by t.t_id; 全AC
点赞 评论

相关推荐

点赞 评论 收藏
分享
黑皮白袜臭脚体育生:简历条例统一按使用了什么技术实现了什么功能解决了问题或提升了什么性能指标来写会好些,如使用布隆过滤器实现了判断短链接是否存在,大大提升了查询速度
点赞 评论 收藏
分享

牛客热帖

更多
牛客网
牛客企业服务