title: function same as lag partition by in clickouse
body: <p>I need to know the frequency of order for each user. I mean difference between 2 order time for each user.
  In SQL I used &quot;Lag Partition by&quot; but I don't know how I can calculate this in click house.
  I need this data:
  <a href="https://i.stack.imgur.com/X1spL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X1spL.jpg" alt="enter image description here" /></a></p>
  <p>at first I should sort data with user_id and created_at then I need to have next order time for each user id in row. I can't use neighbor function because it can't do partition by user_id.</p>