Forum

Posted by Yuanyuan, March 8, 2022, 8:23 p.m.

#83 How to define search volume?

the solution gives order by COUNT(DISTINCT user_id)
I use window function order by count(search_id)
Which should order by count(user_id) not count(search_id)?

Answers

Great question Yuanyuan!
It is a great idea to clarify it with the interviewer during an interview.
To make it clearer, I just updated the question and asked unique users directly.
Thanks,
Leon
SQLPad user avatar

Leon (949)

March 9, 2022, 3:57 p.m.