We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Basic Join
- Top Competitors
- Discussions
Top Competitors
Top Competitors
Sort by
recency
|
2327 Discussions
|
Please Login in order to post a comment
What is error in this? please help
select A.hacker_id, name from (select hacker_id, count(challenge_id) as num from (select A.challenge_id, A.hacker_id, submission_id, difficulty_level, target, B.score as obtained from (select challenge_id, hacker_id, A.difficulty_level, score as target from Challenges as A inner join Difficulty as B on A.difficulty_level = B.difficulty_level) as A inner join Submissions as B on A.challenge_id = B.challenge_id where B.score = target) as A group by hacker_id having count( challenge_id)>1) as A inner join Hackers as B on A.hacker_id = B.hacker_id order by num desc, A.hacker_id asc
MS SQL
Simple Solution
what is the issue with my code?
Select Concat(hacker_id,' ', name) as xyz from ( Select Q.hacker_id , H.name from Hackers as H left join (Select s.hacker_id,s.score from Difficulty as d left join Submissions as s on d.score = s.score)Q on H.hacker_id = Q.hacker_id group by hacker_id , name having count() > 1 order by count() DESC , hacker_id) t