Home Forums Chinese Forum 大数据分析 【面试真题】 The number of output records in joining data

  • 【面试真题】 The number of output records in joining data

     Datura updated 3 years, 11 months ago 1 Member · 1 Post
  • Datura

    Member
    January 12, 2021 at 6:09 pm

    昨天一个学生去一个金融公司面试,面试官问了一个 SQL join 问题:

    Suppose we have 2 tables, they both have some duplicates on the ID variable ( the linking key). If we full join them together, what is the range of the records in the output table?

    This is a very interesting question, it’s not easy for beginners, especially you need to work it out onsite quickly.

    Let me ask a further question:

    If we link them together by SAS DATA step MERGE rather than SQL join, what is the range of the records in the output table?

    Think about it, it is more challenging and difficult than you think. Please post your answers and we can discuss together. It would be better if you work out a general formula.

    • This discussion was modified 3 years, 11 months ago by  Datura.

Log in to reply.

Original Post
0 of 0 posts June 2018
Now