Interviews(内连接,左外连接,分组、聚合)

有contests(contest_id, hacker_id, name),colleges(college_id, contest_id),challenges(challenge_id, college_id),view_stats(challenge_id, total_views, total_unique_views),submission_stats(challenge_id, total_submissions, total_accepted_submissions)表

要求输出:

1、contest_id, hacker_id, name, total_submissions和,total_accepted_submissions和,total_views和,total_unique_views和

2、contest_id升序

sql:

select con.contest_id, con.hacker_id, con.name, sum(t2.sumTotalSubmissions), sum(t2.sumTotalAcceptedSubmissions), sum(t1.sumTotalViews), sum(t1.sumTotalUniqueViews) from contests con inner join colleges col on con.contest_id = col.contest_id inner join challenges cha on col.college_id = cha.college_id
left join
(select challenge_id, sum(total_views) as sumTotalViews, sum(total_unique_views) as sumTotalUniqueViews from view_stats group by challenge_id) t1 on cha.challenge_id = t1.challenge_id
left join
(select challenge_id, sum(total_submissions) as sumTotalSubmissions, sum(total_accepted_submissions) as sumTotalAcceptedSubmissions from submission_stats group by challenge_id) t2 on cha.challenge_id = t2.challenge_id
 group by con.contest_id, con.hacker_id, con.name having sum(t2.sumTotalSubmissions) != 0 or sum(t2.sumTotalAcceptedSubmissions) != 0 or sum(t1.sumTotalViews) != 0 or sum(t1.sumTotalUniqueViews) != 0 order by con.contest_id;


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
As an AI language model, I don't have personal experience with job interviews, but here are some tips on how to prepare an English presentation for a job interview: 1. Understand the job requirements: Before preparing your presentation, make sure you thoroughly understand the job requirements and what the company is looking for in a candidate. This will help you tailor your presentation to the specific job and company. 2. Choose a relevant topic: Choose a topic that is relevant to the job and your skills. This could be a previous project you worked on, a skill you have that is relevant to the job, or your experience in the industry. 3. Create an outline: Create an outline for your presentation that includes an introduction, main points, and a conclusion. Make sure to include any supporting materials or visuals that will help you make your point. 4. Practice: Practice your presentation multiple times before the interview. This will help you become more comfortable with the material and ensure that you are able to present it clearly and confidently. 5. Be concise: Keep your presentation concise and to the point. Avoid rambling or going off-topic. 6. Be professional: Dress appropriately for the interview and be professional in your demeanor and tone. Show the interviewer that you are serious about the job and that you are a professional. 7. Be confident: Be confident in your presentation and yourself. This will help you make a good impression on the interviewer and show that you are the right candidate for the job.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kgduu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值