第一题花了太多时间了,最后只会很笨的方法: drop table if exists t0; drop table if exists t1; drop table if exists t2; create table t0 as (select id from fw_advertiser where industry='Car'); create table t1 as select fwa.name, count(fwc.duration) as total from fw_creative as fwc join fw_advertiser as fwa on fwc.advertiser_id=fwa.id where fwc.duration <= 20 group by fwa.id havin***a.id in (select * from t0); create table t2 as select fwa.name, count(*) as yes from fw_creative as fwc join fw_advertiser as fwa on fwc.advertiser_id=fwa.id group by fwa.id havin***a.id in (select id from fw_advertiser where industry='Car'); select t1.name as advertiser_name, t2.yes / t1.total as percentage from t1 join t2 on t1.name = t2.name; 第二题就是层次遍历就行了。 第三题没时间看
1 7

相关推荐

神哥了不得:你简历字体有点不太协调呀,下面的字实在太小了呀,而且项目也不太行,建议换几个高质量的项目,面试会多很多
点赞 评论 收藏
分享
牛客网
牛客企业服务