You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h3 id="solution-1-equi-join-group-by-summation">Solution 1: Equi-Join + Group By Summation</h3>
73666
73666
<p>We can perform an equi-join to connect the <code>Activities</code> table and the <code>Age</code> table based on <code>user_id</code>. Then, group by <code>age_bucket</code> and finally calculate the percentage of sends and opens for each age group.</p>
<p>First, we join the <code>Project</code> table and the <code>Employees</code> table based on <code>employee_id</code>, then group by <code>team</code> to calculate the average workload of each team, and record it in the temporary table <code>T</code>.</p>
73652
73652
<p>Then, we join the <code>Project</code> table and the <code>Employees</code> table again, and also join the <code>T</code> table, to find employees whose workload is greater than the average workload of the team. Finally, we sort by <code>employee_id</code> and <code>project_id</code>.</p>
<p>First, we list all the friend relationships and record them in table <code>T</code>. Then we find the pairs of friends who do not have common friends.</p>
73631
73631
<p>Next, we can use a subquery to find pairs of friends who do not have common friends, i.e., this pair of friends does not belong to any other person's friends.</p>
0 commit comments