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.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. SQL
  3. Advanced Join
  4. SQL Project Planning
  5. Discussions

SQL Project Planning

Problem
Submissions
Leaderboard
Discussions

    You are viewing a single comment's thread. Return to all comments →

  • kabilanna12345
    2 months ago+ 0 comments

    select start_date,end_date from

    (select start_date,x from (select start_date,row_number() over(order by start_date) x from projects where start_date not in (select end_date from projects)) e ) a join

    (select end_date,y from (select end_date,row_number() over(order by end_date) y from projects where end_date not in (select start_date from projects)) t) b on a.x=b.y

    order by Datediff(end_date, start_date), start_date

    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy