You are viewing a single comment's thread. Return to all comments →
Note these scenario: 1.Find total challenges created by a hacker --SELECT DISTINCT HACKER_ID, COUNT(CHALLENGE_ID) OVER (PARTITION BY HACKER_ID) AS CHALLENGES_CREATED FROM CHALLENGES 2.Find the maxinum number of challenges created --MAX(CHALLENGES_CREATED) OVER (ORDER BY 1) AS MX_CHLNG 3.Find the number of hackers for each no. of challenges created. --COUNT(CHALLENGES_CREATED) OVER(PARTITION BY CHALLENGES_CREATED) AS NO_OF_COMMON_CHLNG_HCKR 4.Applying the conditions to exclude more than one hacker for same no. of challenges created, the no. of challenges should be greater than max. no. of challenge --(CHALLENGES_CREATED>=MX_CHLNG AND NO_OF_COMMON_CHLNG_HCKR!=1) 5.Include the hackers who do not hold same no of challenge with others. --NO_OF_COMMON_CHLNG_HCKR=1
Seems like cookies are disabled on this browser, please enable them to open this website
Challenges
You are viewing a single comment's thread. Return to all comments →