An Efficient Solution is to use the count of previous window, while sliding the window. The idea is to create a hash map that stores elements.
sql analytic functions
1 Article
1
An Efficient Solution is to use the count of previous window, while sliding the window. The idea is to create a hash map that stores elements.