Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Still remember how to select the sum which group by one column?
Try to think about how to get the median from a sorted list.
How to get the median one item for odd number list while how to get the median two items for even number list, try to unify them.